Quantcast

Added final settings

Brandon Talbot [07-24-16 - 18:23]
Added final settings
Fixed box formatting
Filename
src/lua/constants/contstants.lua
src/lua/controller/bag.lua
src/lua/controller/bank.lua
src/lua/core.lua
src/lua/element/container.lua
src/lua/element/item.lua
src/lua/element/itemContainer.lua
src/lua/element/mainBar.lua
src/lua/element/tooltip.lua
src/lua/settings/settingsController.lua
src/lua/settings/settingsElements.lua
src/lua/tools/boxFormatter.lua
src/lua/tools/itemFormatter.lua
src/manifest.xml
src/xml/element/bankBar.xml
src/xml/element/container.xml
src/xml/element/mainBar.xml
src/xml/settings/bankBarSettings.xml
src/xml/settings/categoryDialog.xml
src/xml/settings/containerSettings.xml
src/xml/settings/formatterSettings.xml
src/xml/settings/itemContainerSettings.xml
src/xml/settings/mainBarSettings.xml
src/xml/settings/settingsContainer.xml
src/xml/settings/subClassSettings.xml
src/xml/settings/toggleSettings.xml
diff --git a/src/lua/constants/contstants.lua b/src/lua/constants/contstants.lua
index d2218a7..9f3fdcc 100644
--- a/src/lua/constants/contstants.lua
+++ b/src/lua/constants/contstants.lua
@@ -9,8 +9,8 @@ DJBags_TYPE_MAIN = 'djbags_main_settings'
 DJBags_TYPE_MAIN_BAR = 'djbags_main_bar'
 DJBags_TYPE_BANK_BAR = 'djbags_bank_bar'

-DJBags_FORMATTER_MASONRY = 'Massonry'
-DJBags_FORMATTER_BOX = 'Box'
+DJBags_FORMATTER_MASONRY = 1
+DJBags_FORMATTER_BOX = 2

 --endregion

@@ -32,6 +32,8 @@ DJBags_SETTING_TEXT_SIZE = 'djbags_truncate_text_size'
 DJBags_SETTING_STACK_ALL = 'djbags_stack_all_items'
 DJBags_SETTING_SELL_JUNK = 'djbags_auto_sell_junk'
 DJBags_SETTING_DEPOSIT_REAGENT = 'djbags_auto_deposit_reagents'
+DJBags_SETTING_BOE = 'djbags_class_boe'
+DJBags_SETTING_BOA = 'djbags_class_boa'

 --endregion

@@ -42,6 +44,9 @@ localeText['enUS'] = function()
     DJBags_LOCALE_ITEM_CONTAINER_SETTINGS = 'Item Container Settings:'
     DJBags_LOCALE_CONTAINER_SETTINGS = 'Category Container Settings:'
     DJBags_LOCALE_SUB_CLASS_SETTINGS = 'Sub Class Settings:'
+    DJBags_LOCALE_MAIN_BAR_SETTINGS = 'Main Bar Settings:'
+    DJBags_LOCALE_BANK_BAR_SETTINGS = 'Bank Bar Settings:'
+    DJBags_LOCALE_FORMAT_SETTINGS = 'Format Settings:'
     DJBags_LOCALE_SETTINGS = 'DJBags Settings:'
     DJBags_LOCALE_CLEAR_NEW_ITEMS = 'Clear new items'
     DJBags_LOCALE_BACKGROUND_COLOR = 'Background color'
@@ -54,8 +59,15 @@ localeText['enUS'] = function()
     DJBags_LOCALE_STACK_ALL = 'Stack all items'
     DJBags_LOCALE_SELL_JUNK = 'Auto sell junk'
     DJBags_LOCALE_DEPOSIT_REAGENT = 'Auto deposit reagents'
-    DJBags_LOCALE_MASONRY = 'Massonry'
+    DJBags_LOCALE_MASONRY = 'Masonry'
     DJBags_LOCALE_BOX = 'Box'
+    DJBags_LOCALE_CATEGORY_DIALOG_TITLE = 'Set category for: %s'
+    DJBags_LOCALE_GLOBAL = 'Global'
+    DJBags_LOCALE_BOE = 'BoE'
+    DJBags_LOCALE_BOA = 'BoA'
+    DJBags_LOCALE_VERTICAL = 'Vertical'
+    DJBags_LOCALE_MAX_ITEMS = 'Max items'
+    DJBags_LOCALE_MAX_HEIGHT = 'Max height'
 end

 if localeText[GetLocale()] then
diff --git a/src/lua/controller/bag.lua b/src/lua/controller/bag.lua
index 1c9f704..006d020 100644
--- a/src/lua/controller/bag.lua
+++ b/src/lua/controller/bag.lua
@@ -58,6 +58,12 @@ function controller:Close()
     DJBagsBagContainer:Hide()
 end

+function controller:OnItemsCleared()
+    if DJBagsBagContainer:IsVisible() then
+        self:Update()
+    end
+end
+
 function controller:BAG_UPDATE(bag)
     ADDON:UpdateBags({bag})
     DJBagsBagContainer:Arrange()
diff --git a/src/lua/controller/bank.lua b/src/lua/controller/bank.lua
index b160b9f..12ee421 100644
--- a/src/lua/controller/bank.lua
+++ b/src/lua/controller/bank.lua
@@ -19,6 +19,7 @@ function DJBagsBankBar_OnShow(self)
     self:Update()
     controller:Register()
     controller:Update()
+    controller:DepositReagents()
 end

 function DJBagsBankBar_OnHide(self)
@@ -37,12 +38,25 @@ function DJBagsBankTab_OnClick(tab)
     end
 end

+function controller:DepositReagents()
+    if ADDON.settings:GetSettings(DJBags_TYPE_MAIN)[DJBags_SETTING_DEPOSIT_REAGENT] then
+        PlaySound("igMainMenuOption");
+        DepositReagentBank();
+    end
+end
+
 function controller:Update()
     ADDON:UpdateBags({-1, 5, 6, 7, 8, 9, 10, 11, -3})
     DJBagsBankContainer:Arrange()
     self:ArrangeReagents()
 end

+function controller:OnItemsCleared()
+    if DJBagsBankBar:IsVisible() then
+        self:Update()
+    end
+end
+
 function controller:ArrangeReagents()
     if IsReagentBankUnlocked() then
         DJBagsReagentContainer.reagentButton:Hide()
diff --git a/src/lua/core.lua b/src/lua/core.lua
index 8d8f39f..d007dcf 100644
--- a/src/lua/core.lua
+++ b/src/lua/core.lua
@@ -16,6 +16,11 @@ ADDON.events:Add('ADDON_LOADED', core)

 --region Bag commands

+function DJBags_ItemsCleared()
+    ADDON.bagController:OnItemsCleared()
+    ADDON.bankController:OnItemsCleared()
+end
+
 ToggleAllBags = function()
     ADDON.bagController:Toggle()
 end
@@ -48,9 +53,9 @@ end

 --endregion

-SLASH_DJBAGS1 = '/djb';
+SLASH_DJBAGS1, SLASH_DJBAGS2, SLASH_DJBAGS3 = '/djb', '/dj', 'djbags';
 function SlashCmdList.DJBAGS(msg, editbox)
-    DJBagsBankBar:Show()
+    DJBagsSettingsContainer:Show()
 end

 SLASH_RL1 = '/rl';
diff --git a/src/lua/element/container.lua b/src/lua/element/container.lua
index 01ed7b0..ce9e008 100644
--- a/src/lua/element/container.lua
+++ b/src/lua/element/container.lua
@@ -84,6 +84,6 @@ function container:Arrange(override)
         ADDON.settings:GetSettings(self.__type)[DJBags_SETTING_FORMATTER_MAX_HEIGHT],
         ADDON.settings:GetSettings(self.__type)[DJBags_SETTING_FORMATTER_BOX_COLS],
         ADDON.settings:GetSettings(self.__type)[DJBags_SETTING_FORMATTER_VERT],
-        override
+        override == 2
     )
 end
\ No newline at end of file
diff --git a/src/lua/element/item.lua b/src/lua/element/item.lua
index 18fc737..37dd239 100644
--- a/src/lua/element/item.lua
+++ b/src/lua/element/item.lua
@@ -35,7 +35,7 @@ end
 function item:OnClick(button)
     if self:GetParent().id then
         if IsAltKeyDown() and button == 'LeftButton' then
---            ADDON.categoryDialog(self:GetParent().id)
+            DJBagsCategoryDialogLoad(self:GetParent().id, self:GetParent().name)
         end
     end
 end
@@ -58,15 +58,21 @@ function item:GetContainerName()

         local userDefinedList = ADDON.settings:GetUserDefinedList()
         if userDefinedList[self.id] then
-            return userDefinedList[self.id] .. '*'
+            return userDefinedList[self.id]
         end

         local globalDefinedList = ADDON.settings:GetGlobalUserDefinedList()
         if globalDefinedList[self.id] then
-            return globalDefinedList[self.id] .. '**'
+            return globalDefinedList[self.id]
         end

         local subClassSplitList = ADDON.settings:GetSettings(DJBags_TYPE_SUB_CLASS)
+        if subClassSplitList[DJBags_SETTING_BOE] and DJBagsTooltip:IsItemBOE(self.link) then
+            return DJBags_LOCALE_BOE
+        end
+        if subClassSplitList[DJBags_SETTING_BOA] and DJBagsTooltip:IsItemBOA(self.link) then
+            return DJBags_LOCALE_BOA
+        end
         if subClassSplitList[self.classId] then
             return self.class .. (self.subClass == BAG_FILTER_JUNK and '' or '_' .. self.subClass)
         end
diff --git a/src/lua/element/itemContainer.lua b/src/lua/element/itemContainer.lua
index 8b422ae..2861e47 100644
--- a/src/lua/element/itemContainer.lua
+++ b/src/lua/element/itemContainer.lua
@@ -91,9 +91,9 @@ function container:GetCount()
     return ADDON:Count(self.items)
 end

-function container:Arrange(max, vert, maxCnt, override)
+function container:Arrange(max, vert, maxCnt, override, forceSize)
     if override then
         self.arrange = nil
     end
-    ADDON:ArrangeItemContainer(self, max, vert, maxCnt)
+    ADDON:ArrangeItemContainer(self, max, vert, maxCnt, forceSize)
 end
\ No newline at end of file
diff --git a/src/lua/element/mainBar.lua b/src/lua/element/mainBar.lua
index f2ec1a1..998f505 100644
--- a/src/lua/element/mainBar.lua
+++ b/src/lua/element/mainBar.lua
@@ -22,6 +22,7 @@ function container:Init()
         {0, 0, 0, 0.6},
         {0.3, 0.3, 0.3, 1}
     )
+
     self:Show()
 end

@@ -37,4 +38,4 @@ end
 function container:SetColors(background, border)
     self:SetBackdropColor(unpack(background))
     self:SetBackdropBorderColor(unpack(border))
-end
+end
\ No newline at end of file
diff --git a/src/lua/element/tooltip.lua b/src/lua/element/tooltip.lua
index a6e9609..8e5a168 100644
--- a/src/lua/element/tooltip.lua
+++ b/src/lua/element/tooltip.lua
@@ -16,4 +16,34 @@ function DJBagsTooltip:GetItemLevel(link)
             end
         end
     end
-end
\ No newline at end of file
+end
+
+function DJBagsTooltip:IsItemBOE(link)
+    self:SetOwner(UIParent, "ANCHOR_NONE")
+    self:SetHyperlink(link)
+
+    for i = 2, self:NumLines() do
+        local text = _G[self:GetName() .. "TextLeft"..i]:GetText()
+
+        if text and text:find(ITEM_BIND_ON_EQUIP) then
+            return true
+        end
+    end
+
+    return false
+end
+
+function DJBagsTooltip:IsItemBOA(link)
+    self:SetOwner(UIParent, "ANCHOR_NONE")
+    self:SetHyperlink(link)
+
+    for i = 2, self:NumLines() do
+        local text = _G[self:GetName() .. "TextLeft"..i]:GetText()
+
+        if text and text:find(ITEM_BIND_TO_BNETACCOUNT) then
+            return true
+        end
+    end
+
+    return false
+end
diff --git a/src/lua/settings/settingsController.lua b/src/lua/settings/settingsController.lua
index 4b2745e..467fde8 100644
--- a/src/lua/settings/settingsController.lua
+++ b/src/lua/settings/settingsController.lua
@@ -43,7 +43,7 @@ function settings:Init()
             [DJBags_SETTING_FORMATTER] = DJBags_FORMATTER_MASONRY,
             [DJBags_SETTING_FORMATTER_VERT] = false,
             [DJBags_SETTING_FORMATTER_MAX_ITEMS] = 12,
-            [DJBags_SETTING_FORMATTER_MAX_HEIGHT] = 0.5,
+            [DJBags_SETTING_FORMATTER_MAX_HEIGHT] = 50,
             [DJBags_SETTING_FORMATTER_BOX_COLS] = 4,
             [DJBags_SETTING_TRUNCATE_SUB_CLASS] = true,
         },
@@ -65,6 +65,8 @@ function settings:Init()
             [LE_ITEM_CLASS_RECIPE] = false,
             [LE_ITEM_CLASS_TRADEGOODS] = true,
             [LE_ITEM_CLASS_WEAPON] = false,
+            [DJBags_SETTING_BOE] = false,
+            [DJBags_SETTING_BOA] = false,
         },
         [DJBags_TYPE_MAIN_BAR] = {
             [DJBags_SETTING_BACKGROUND_COLOR] = {0, 0, 0, 0.6},
@@ -126,10 +128,26 @@ function settings:GetUserDefinedList()
     return DJBags_DB[self.realm][self.player].userDefined
 end

+function settings:AddUserDefinedItem(id, name)
+    DJBags_DB[self.realm][self.player].userDefined[id] = name
+    self:Update(2)
+end
+
 function settings:GetGlobalUserDefinedList()
     return DJBags_DB.userDefined
 end

+function settings:AddGlobalDefinedItem(id, name)
+    DJBags_DB.userDefined[id] = name
+    self:Update(2)
+end
+
+function settings:ClearUserDefinedItem(id)
+    DJBags_DB[self.realm][self.player].userDefined[id] = nil
+    DJBags_DB.userDefined[id] = nil
+    self:Update(2)
+end
+
 function settings:MigrateSettings(table, default)
     for k, v in pairs(default) do
         if table[k] ~= nil then
diff --git a/src/lua/settings/settingsElements.lua b/src/lua/settings/settingsElements.lua
index fb80662..3608de4 100644
--- a/src/lua/settings/settingsElements.lua
+++ b/src/lua/settings/settingsElements.lua
@@ -5,7 +5,7 @@ local function round(num, idp)
     return math.floor(num * mult + 0.5) / mult
 end

-function DJBagsInitSettingsSlider(slider, name, min, max, step, type, setting)
+function DJBagsInitSettingsSlider(slider, name, min, max, step, type, setting, noDeciaml)
     local value = ADDON.settings:GetSettings(type)[setting]

     _G[slider:GetName() .. 'Text']:SetText(tostring(name) .. ' - ' .. value)
@@ -15,6 +15,7 @@ function DJBagsInitSettingsSlider(slider, name, min, max, step, type, setting)
     slider.type = type
     slider.setting = setting
     slider.name = name
+    slider.noDecimal = noDeciaml

     local onChange = slider:GetScript('OnValueChanged')
     slider:SetScript('OnValueChanged', nil)
@@ -24,7 +25,8 @@ function DJBagsInitSettingsSlider(slider, name, min, max, step, type, setting)
 end

 function DJBagsSettingsSlider_OnChange(self, value)
-    _G[self:GetName() .. 'Text']:SetText(tostring(self.name) .. ' - ' .. round(value, 1))
+    _G[self:GetName() .. 'Text']:SetText(tostring(self.name) .. ' - ' .. round(value, self.noDecimal and 0 or 1))
+    value = self.noDecimal and round(value, 0) or value
     ADDON.settings:SetSettings(self.type, self.setting, value, 1)
 end

@@ -69,4 +71,104 @@ end

 function DJBagsSettingsCheckBox_OnChange(checkbox, checked)
     ADDON.settings:SetSettings(checkbox.type, checkbox.setting, checked, checkbox.arrangeType)
+end
+
+function DJBagsCategoryDialogLoad(id, name)
+    DJBagsCategoryDialog:Show()
+    DJBagsCategoryDialog.name:SetText(string.format(DJBags_LOCALE_CATEGORY_DIALOG_TITLE, name))
+    DJBagsCategoryDialog.id = id
+
+    local userDefined = ADDON.settings:GetUserDefinedList()
+    local globalDefined = ADDON.settings:GetGlobalUserDefinedList()
+    local current = userDefined[id] or globalDefined[id]
+
+    if current then
+        DJBagsCategoryDialog.edit:SetText(current)
+        DJBagsCategoryDialog.global:SetChecked(userDefined[id] == nil)
+    else
+        DJBagsCategoryDialog.edit:SetText('')
+        DJBagsCategoryDialog.global:SetChecked(false)
+    end
+    DJBagsCategoryDialog.edit:SetFocus()
+
+    UIDropDownMenu_Initialize(DJBagsCategoryDialog.dropdown, function(self, level)
+        local unique = {}
+        for _, v in pairs(ADDON.settings:GetUserDefinedList()) do
+            unique[v] = true
+        end
+        for _, v in pairs(ADDON.settings:GetGlobalUserDefinedList()) do
+            unique[v] = true
+        end
+
+        if next(unique) ~= nil then
+            local info
+            for k, _ in pairs(unique) do
+                info = UIDropDownMenu_CreateInfo()
+                info.text = k
+                info.value = k
+                info.func = DJBagsCategoryDialog_DropDownClick
+                UIDropDownMenu_AddButton(info, level)
+            end
+        end
+    end)
+end
+
+function DJBagsCategoryDialog_DropDownClick(self)
+    UIDropDownMenu_SetSelectedID(DJBagsCategoryDialog.dropdown, self:GetID())
+    DJBagsCategoryDialog.edit:SetText(self.value)
+end
+
+function DJBagsCategoryDialog_Done()
+    local global = DJBagsCategoryDialog.global:GetChecked()
+    local text = DJBagsCategoryDialog.edit:GetText()
+    if text and text ~= '' then
+        if global then
+            ADDON.settings:AddGlobalDefinedItem(DJBagsCategoryDialog.id, text)
+        else
+            ADDON.settings:AddUserDefinedItem(DJBagsCategoryDialog.id, text)
+        end
+        DJBagsCategoryDialog:Hide()
+    end
+end
+
+function DJBagsCategoryDialog_Clear()
+    ADDON.settings:ClearUserDefinedItem(DJBagsCategoryDialog.id)
+    DJBagsCategoryDialog:Hide()
+end
+
+function DJBagsFormatSettings_OnLoad(self)
+    local type = ADDON.settings:GetSettings(DJBags_TYPE_CONTAINER)[DJBags_SETTING_FORMATTER]
+    function self:ShowContainer(type)
+        if type == 1 then
+            self.masonry:Show()
+            self.box:Hide()
+        else
+            self.masonry:Hide()
+            self.box:Show()
+        end
+    end
+    self:ShowContainer(type)
+
+    UIDropDownMenu_Initialize(self.dropdown, function(_, level)
+        local unique = {
+            DJBags_LOCALE_MASONRY,
+            DJBags_LOCALE_BOX
+        }
+
+        local cnt = 0
+        local info
+        for _, k in pairs(unique) do
+            cnt = cnt + 1
+            info = UIDropDownMenu_CreateInfo()
+            info.text = k
+            info.value = cnt
+            info.func = function(item)
+                ADDON.settings:SetSettings(DJBags_TYPE_CONTAINER, DJBags_SETTING_FORMATTER, item.value, 2)
+                self:ShowContainer(item.value)
+                UIDropDownMenu_SetSelectedID(self.dropdown, item.value)
+            end
+            UIDropDownMenu_AddButton(info, level)
+        end
+    end)
+    UIDropDownMenu_SetSelectedID(self.dropdown, type)
 end
\ No newline at end of file
diff --git a/src/lua/tools/boxFormatter.lua b/src/lua/tools/boxFormatter.lua
index 33ebcb5..107a6cd 100644
--- a/src/lua/tools/boxFormatter.lua
+++ b/src/lua/tools/boxFormatter.lua
@@ -31,9 +31,9 @@ ADDON.format[DJBags_FORMATTER_BOX] = function(frame, _, maxHeight, cols, _, over
             item:Hide()
         else
             item:ClearAllPoints()
-            item:Arrange(cols, nil, (item.name:GetText() == EMPTY and 1), override)
+            item:Arrange(cols, nil, (item.name:GetText() == EMPTY and 1), override, true)
             item:Show()
-            if (y + item:GetHeight() + frame.spacing) > (maxHeight * GetScreenHeight()) then
+            if (y + item:GetHeight() + frame.spacing) > (maxHeight / 100 * GetScreenHeight()) then
                 y = 0
                 x = x - item:GetWidth() - frame.spacing
             end
diff --git a/src/lua/tools/itemFormatter.lua b/src/lua/tools/itemFormatter.lua
index 822e154..48d6fe8 100644
--- a/src/lua/tools/itemFormatter.lua
+++ b/src/lua/tools/itemFormatter.lua
@@ -20,7 +20,7 @@ local function alreadySorted(frame, max, vert)
     return false
 end

-function ADDON:ArrangeItemContainer(frame, max, vert, maxCnt)
+function ADDON:ArrangeItemContainer(frame, max, vert, maxCnt, force)
     if frame:IsEmpty() or alreadySorted(frame, max, vert) then return end

     local itemCount = 0
@@ -69,7 +69,9 @@ function ADDON:ArrangeItemContainer(frame, max, vert, maxCnt)
     end

     local colSize = math.ceil(itemCount / max) * (next(frame.items):GetWidth() + frame.spacing) - frame.spacing
-    local rowSize = (maxCnt and maxCnt or (itemCount < max and itemCount or max)) * (frame.spacing + next(frame.items):GetWidth()) - frame.spacing
+    local numCols = force and max or (maxCnt and maxCnt or (itemCount < max and itemCount or max))
+    print(numCols, force)
+    local rowSize = numCols * (frame.spacing + next(frame.items):GetWidth()) - frame.spacing

     frame:SetSize(
         (vert and colSize or rowSize) + frame.padding * 2,
diff --git a/src/manifest.xml b/src/manifest.xml
index 2e49aa6..86f1ef1 100644
--- a/src/manifest.xml
+++ b/src/manifest.xml
@@ -42,7 +42,11 @@
     <Include file="src/xml/settings/containerSettings.xml" />
     <Include file="src/xml/settings/subClassSettings.xml" />
     <Include file="src/xml/settings/toggleSettings.xml" />
+    <Include file="src/xml/settings/mainBarSettings.xml" />
+    <Include file="src/xml/settings/bankBarSettings.xml" />
+    <Include file="src/xml/settings/formatterSettings.xml" />
     <Include file="src/xml/settings/settingsContainer.xml" />
+    <Include file="src/xml/settings/categoryDialog.xml" />

     <!-- Core (Load last) -->
     <Script file="src/lua/core.lua"/>
diff --git a/src/xml/element/bankBar.xml b/src/xml/element/bankBar.xml
index b1c359b..55e9e67 100644
--- a/src/xml/element/bankBar.xml
+++ b/src/xml/element/bankBar.xml
@@ -80,11 +80,23 @@
                     </OnLoad>
                 </Scripts>
             </Button>
+            <Button name="$parentDepositReagent" inherits="UIPanelButtonTemplate" text="REAGENTBANK_DEPOSIT">
+                <Size x="150" y="25" />
+                <Anchors>
+                    <Anchor point="TOPRIGHT" relativeTo="$parentBag7" relativePoint="BOTTOMRIGHT" y="-5" />
+                </Anchors>
+                <Scripts>
+                    <OnClick>
+                        PlaySound("igMainMenuOption");
+                        DepositReagentBank();
+                    </OnClick>
+                </Scripts>
+            </Button>
             <EditBox name="$parentSearchBar" inherits="BagSearchBoxTemplate">
                 <Size y="25" />
                 <Anchors>
                     <Anchor point="TOPLEFT" relativeTo="$parentBag1" relativePoint="BOTTOMLEFT" x="5" y="-5"/>
-                    <Anchor point="TOPRIGHT" relativeTo="$parentBag7" relativePoint="BOTTOMRIGHT" y="-5" />
+                    <Anchor point="RIGHT" relativeTo="$parentDepositReagent" relativePoint="LEFT" x="-5" />
                 </Anchors>
             </EditBox>
             <Button name="$parentTab1" inherits="TabButtonTemplate" text="BANK">
diff --git a/src/xml/element/container.xml b/src/xml/element/container.xml
index 2f80446..33b72ec 100644
--- a/src/xml/element/container.xml
+++ b/src/xml/element/container.xml
@@ -4,6 +4,8 @@
             <EdgeSize>
                 <AbsValue val="1" />
             </EdgeSize>
+            <Color r="0" g="0" b="0" a="0.6" />
+            <BorderColor r="0.3" g="0.3" b="0.3" a="1" />
         </Backdrop>
         <Frames>
             <Frame name="$parentContainer" parentKey="container" />
diff --git a/src/xml/element/mainBar.xml b/src/xml/element/mainBar.xml
index cd295ac..6418ff9 100644
--- a/src/xml/element/mainBar.xml
+++ b/src/xml/element/mainBar.xml
@@ -41,6 +41,7 @@
                     </OnLeave>
                     <OnClick>
                         C_NewItems:ClearAll()
+                        DJBags_ItemsCleared()
                     </OnClick>
                 </Scripts>
             </Button>
diff --git a/src/xml/settings/bankBarSettings.xml b/src/xml/settings/bankBarSettings.xml
index e69de29..deb7405 100644
--- a/src/xml/settings/bankBarSettings.xml
+++ b/src/xml/settings/bankBarSettings.xml
@@ -0,0 +1,44 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
+    <Frame name="DJBagsBankBarSettings" hidden="false" virtual="true">
+        <Size x="500" y="65"/>
+        <Backdrop bgFile="Interface\ChatFrame\ChatFrameBackground" edgeFile="Interface\Buttons\WHITE8x8">
+            <EdgeSize>
+                <AbsValue val="1" />
+            </EdgeSize>
+            <Color r="0" g="0" b="0" a="0.6" />
+            <BorderColor r="0.3" g="0.3" b="0.3" a="1" />
+        </Backdrop>
+        <Layers>
+            <Layer level="ARTWORK">
+                <FontString name="$parentName" inherits="GameFontNormal" text="DJBags_LOCALE_BANK_BAR_SETTINGS">
+                    <Anchors>
+                        <Anchor point="TOPLEFT" x="15" y="-5"/>
+                    </Anchors>
+                </FontString>
+            </Layer>
+        </Layers>
+        <Frames>
+            <Button name="$parentBackgroundColorSelect" inherits="DJBagsColorPickerTemplate" text="DJBags_LOCALE_BACKGROUND_COLOR">
+                <Anchors>
+                    <Anchor point="TOPLEFT" relativeTo="$parentName" relativePoint="BOTTOMLEFT" x="5" y="-15" />
+                </Anchors>
+                <Scripts>
+                    <OnShow>
+                        DJBagsInitSettingsColorPicker(self, DJBags_TYPE_BANK_BAR, DJBags_SETTING_BACKGROUND_COLOR)
+                    </OnShow>
+                </Scripts>
+            </Button>
+            <Button name="$parentBorderColorSelect" inherits="DJBagsColorPickerTemplate" text="DJBags_LOCALE_BORDER_COLOR">
+                <Anchors>
+                    <Anchor point="LEFT" relativeTo="$parentBackgroundColorSelect" relativePoint="RIGHT" x="5" y="0" />
+                </Anchors>
+                <Scripts>
+                    <OnShow>
+                        DJBagsInitSettingsColorPicker(self, DJBags_TYPE_BANK_BAR, DJBags_SETTING_BORDER_COLOR)
+                    </OnShow>
+                </Scripts>
+            </Button>
+        </Frames>
+    </Frame>
+</Ui>
diff --git a/src/xml/settings/categoryDialog.xml b/src/xml/settings/categoryDialog.xml
index e69de29..d0c33ec 100644
--- a/src/xml/settings/categoryDialog.xml
+++ b/src/xml/settings/categoryDialog.xml
@@ -0,0 +1,98 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
+    <Frame name="DJBagsCategoryDialog" parent="UIParent" inherits="DJBagsContainerTemplate" hidden="true">
+        <Size x="450" y="90"/>
+        <Anchors>
+            <Anchor point="CENTER" />
+        </Anchors>
+        <Layers>
+            <Layer level="ARTWORK">
+                <FontString name="$parentName" parentKey="name" inherits="GameFontNormal">
+                    <Anchors>
+                        <Anchor point="TOP" y="-5"/>
+                    </Anchors>
+                </FontString>
+            </Layer>
+        </Layers>
+        <Frames>
+            <EditBox name="$parentCategoryEdit" parentKey="edit">
+                <Backdrop bgFile="Interface\ChatFrame\ChatFrameBackground" edgeFile="Interface\Buttons\WHITE8x8">
+                    <EdgeSize>
+                        <AbsValue val="1" />
+                    </EdgeSize>
+                    <Color r="0" g="0" b="0" a="0.6" />
+                    <BorderColor r="0.3" g="0.3" b="0.3" a="1" />
+                </Backdrop>
+                <Size x="300" y="25" />
+                <Anchors>
+                    <Anchor point="TOPLEFT" x="5" y="-25" />
+                </Anchors>
+                <FontString inherits="GameFontNormal" />
+                <Scripts>
+                    <OnLoad>
+                        self:SetAutoFocus(false)
+                    </OnLoad>
+                    <OnEscapePressed>
+                        self:ClearFocus()
+                    </OnEscapePressed>
+                    <OnEnterPressed>
+                        DJBagsCategoryDialog_Done()
+                    </OnEnterPressed>
+                </Scripts>
+            </EditBox>
+            <Button name="$parentDropDown" parentKey="dropdown" inherits="UIDropDownMenuTemplate">
+                <Anchors>
+                    <Anchor point="LEFT" relativeTo="$parentCategoryEdit" relativePoint="RIGHT" x="5" y="-3" />
+                </Anchors>
+                <Scripts>
+                    <OnLoad>
+                        UIDropDownMenu_SetWidth(self, 100);
+                        UIDropDownMenu_SetButtonWidth(self, 124)
+                        UIDropDownMenu_JustifyText(self, "LEFT")
+                    </OnLoad>
+                </Scripts>
+            </Button>
+            <Button name="$parentOK" inherits="UIPanelButtonTemplate" text="DONE">
+                <Size x="75" y="25" />
+                <Anchors>
+                    <Anchor point="BOTTOMRIGHT" relativeTo="$parent" relativePoint="BOTTOMRIGHT" x="-5" y="5" />
+                </Anchors>
+                <Scripts>
+                    <OnClick>
+                        DJBagsCategoryDialog_Done()
+                    </OnClick>
+                </Scripts>
+            </Button>
+            <Button name="$parentClear" inherits="UIPanelButtonTemplate" text="RESET">
+                <Size x="75" y="25" />
+                <Anchors>
+                    <Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="BOTTOMLEFT" x="5" y="5" />
+                </Anchors>
+                <Scripts>
+                    <OnClick>
+                        DJBagsCategoryDialog_Clear()
+                    </OnClick>
+                </Scripts>
+            </Button>
+            <CheckButton name="$parentGlobal" parentKey="global" inherits="UICheckButtonTemplate">
+                <Anchors>
+                    <Anchor point="RIGHT" relativeTo="$parentOK" relativePoint="LEFT" x="-50" />
+                </Anchors>
+                <Scripts>
+                    <OnLoad>
+                        _G[self:GetName() .. 'Text']:SetText(DJBags_LOCALE_GLOBAL)
+                    </OnLoad>
+                </Scripts>
+            </CheckButton>
+        </Frames>
+        <Scripts>
+            <OnLoad>
+                table.insert(UISpecialFrames, self:GetName())
+                self:RegisterForDrag("LeftButton")
+                self:SetScript("OnDragStart", self.StartMoving)
+                self:SetScript("OnDragStop", self.StopMovingOrSizing)
+                self:SetUserPlaced(true)
+            </OnLoad>
+        </Scripts>
+    </Frame>
+</Ui>
diff --git a/src/xml/settings/containerSettings.xml b/src/xml/settings/containerSettings.xml
index 4e3bdee..9999c87 100644
--- a/src/xml/settings/containerSettings.xml
+++ b/src/xml/settings/containerSettings.xml
@@ -1,7 +1,14 @@
 <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
-    <Frame name="DJBagsContainerSettings" inherits="DJBagsContainerTemplate" hidden="false" virtual="true">
+    <Frame name="DJBagsContainerSettings" hidden="false" virtual="true">
         <Size x="500" y="175"/>
+        <Backdrop bgFile="Interface\ChatFrame\ChatFrameBackground" edgeFile="Interface\Buttons\WHITE8x8">
+            <EdgeSize>
+                <AbsValue val="1" />
+            </EdgeSize>
+            <Color r="0" g="0" b="0" a="0.6" />
+            <BorderColor r="0.3" g="0.3" b="0.3" a="1" />
+        </Backdrop>
         <Layers>
             <Layer level="ARTWORK">
                 <FontString name="$parentName" inherits="GameFontNormal" text="DJBags_LOCALE_CONTAINER_SETTINGS">
@@ -62,11 +69,5 @@
                 </Scripts>
             </Slider>
         </Frames>
-        <Scripts>
-            <OnLoad>
-                self:SetBackdropColor(0, 0, 0, 0.6)
-                self:SetBackdropBorderColor(0.3, 0.3, 0.3, 1)
-            </OnLoad>
-        </Scripts>
     </Frame>
 </Ui>
diff --git a/src/xml/settings/formatterSettings.xml b/src/xml/settings/formatterSettings.xml
new file mode 100644
index 0000000..36be2e9
--- /dev/null
+++ b/src/xml/settings/formatterSettings.xml
@@ -0,0 +1,109 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
+    <Frame name="DJBagsFormatSettings" hidden="false" virtual="true">
+        <Size x="500" y="160"/>
+        <Backdrop bgFile="Interface\ChatFrame\ChatFrameBackground" edgeFile="Interface\Buttons\WHITE8x8">
+            <EdgeSize>
+                <AbsValue val="1" />
+            </EdgeSize>
+            <Color r="0" g="0" b="0" a="0.6" />
+            <BorderColor r="0.3" g="0.3" b="0.3" a="1" />
+        </Backdrop>
+        <Layers>
+            <Layer level="ARTWORK">
+                <FontString name="$parentName" inherits="GameFontNormal" text="DJBags_LOCALE_FORMAT_SETTINGS">
+                    <Anchors>
+                        <Anchor point="TOPLEFT" x="15" y="-5"/>
+                    </Anchors>
+                </FontString>
+            </Layer>
+        </Layers>
+        <Frames>
+            <Button name="$parentDropDown" parentKey="dropdown" inherits="UIDropDownMenuTemplate">
+                <Anchors>
+                    <Anchor point="TOPLEFT" relativeTo="$parentName" relativePoint="BOTTOMLEFT" y="-5" />
+                </Anchors>
+                <Scripts>
+                    <OnLoad>
+                        UIDropDownMenu_SetWidth(self, 100);
+                        UIDropDownMenu_SetButtonWidth(self, 124)
+                        UIDropDownMenu_JustifyText(self, "LEFT")
+                    </OnLoad>
+                </Scripts>
+            </Button>
+            <Frame name="$parentMasonry" parentKey="masonry">
+                <Anchors>
+                    <Anchor point="TOPLEFT" relativeTo="$parentDropDown" relativePoint="BOTTOMLEFT" y="-5"  />
+                    <Anchor point="BOTTOMRIGHT" relativeTo="$parent" x="-5" y="5" />
+                </Anchors>
+                <Frames>
+                    <CheckButton name="$parentVertical" inherits="DJBagsSettingsCheckBoxTemplate">
+                        <Anchors>
+                            <Anchor point="TOPLEFT" />
+                        </Anchors>
+                        <Scripts>
+                            <OnShow>
+                                DJBagsInitSettingsCheckBox(self, DJBags_LOCALE_VERTICAL, DJBags_TYPE_CONTAINER, DJBags_SETTING_FORMATTER_VERT, 2)
+                            </OnShow>
+                        </Scripts>
+                    </CheckButton>
+                    <Slider name="$parentItemsSlider" inherits="DJBagsSettingsSliderTemplate">
+                        <Anchors>
+                            <Anchor point="TOPLEFT" relativeTo="$parentVertical" relativePoint="BOTTOMLEFT">
+                                <Offset>
+                                    <AbsDimension x="0" y="-32"/>
+                                </Offset>
+                            </Anchor>
+                        </Anchors>
+                        <Scripts>
+                            <OnShow>
+                                DJBagsInitSettingsSlider(self, DJBags_LOCALE_MAX_ITEMS, 5, 20, 1, DJBags_TYPE_CONTAINER, DJBags_SETTING_FORMATTER_MAX_ITEMS, true)
+                            </OnShow>
+                        </Scripts>
+                    </Slider>
+                </Frames>
+            </Frame>
+            <Frame name="$parentBox" parentKey="box">
+                <Anchors>
+                    <Anchor point="TOPLEFT" relativeTo="$parentDropDown" relativePoint="BOTTOMLEFT" y="-5"  />
+                    <Anchor point="BOTTOMRIGHT" relativeTo="$parent" x="-5" y="5" />
+                </Anchors>
+                <Frames>
+                    <Slider name="$parentItemsSlider" inherits="DJBagsSettingsSliderTemplate">
+                        <Anchors>
+                            <Anchor point="TOPLEFT" >
+                                <Offset>
+                                    <AbsDimension x="0" y="-20"/>
+                                </Offset>
+                            </Anchor>
+                        </Anchors>
+                        <Scripts>
+                            <OnShow>
+                                DJBagsInitSettingsSlider(self, DJBags_LOCALE_MAX_ITEMS, 5, 20, 1, DJBags_TYPE_CONTAINER, DJBags_SETTING_FORMATTER_BOX_COLS, true)
+                            </OnShow>
+                        </Scripts>
+                    </Slider>
+                    <Slider name="$parentHeightSlider" inherits="DJBagsSettingsSliderTemplate">
+                        <Anchors>
+                            <Anchor point="TOPLEFT" relativeTo="$parentItemsSlider" relativePoint="BOTTOMLEFT">
+                                <Offset>
+                                    <AbsDimension x="0" y="-32"/>
+                                </Offset>
+                            </Anchor>
+                        </Anchors>
+                        <Scripts>
+                            <OnShow>
+                                DJBagsInitSettingsSlider(self, DJBags_LOCALE_MAX_HEIGHT, 30, 100, 1, DJBags_TYPE_CONTAINER, DJBags_SETTING_FORMATTER_MAX_HEIGHT)
+                            </OnShow>
+                        </Scripts>
+                    </Slider>
+                </Frames>
+            </Frame>
+        </Frames>
+        <Scripts>
+            <OnShow>
+                DJBagsFormatSettings_OnLoad(self)
+            </OnShow>
+        </Scripts>
+    </Frame>
+</Ui>
diff --git a/src/xml/settings/itemContainerSettings.xml b/src/xml/settings/itemContainerSettings.xml
index 6b6ff02..5380461 100644
--- a/src/xml/settings/itemContainerSettings.xml
+++ b/src/xml/settings/itemContainerSettings.xml
@@ -1,7 +1,14 @@
 <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
-    <Frame name="DJBagsItemContainerSettings" inherits="DJBagsContainerTemplate" hidden="false" virtual="true">
+    <Frame name="DJBagsItemContainerSettings" hidden="false" virtual="true">
         <Size x="500" y="220"/>
+        <Backdrop bgFile="Interface\ChatFrame\ChatFrameBackground" edgeFile="Interface\Buttons\WHITE8x8">
+            <EdgeSize>
+                <AbsValue val="1" />
+            </EdgeSize>
+            <Color r="0" g="0" b="0" a="0.6" />
+            <BorderColor r="0.3" g="0.3" b="0.3" a="1" />
+        </Backdrop>
         <Layers>
             <Layer level="ARTWORK">
                 <FontString name="$parentName" inherits="GameFontNormal" text="DJBags_LOCALE_ITEM_CONTAINER_SETTINGS">
@@ -86,11 +93,5 @@
                 </Scripts>
             </Slider>
         </Frames>
-        <Scripts>
-            <OnLoad>
-                self:SetBackdropColor(0, 0, 0, 0.6)
-                self:SetBackdropBorderColor(0.3, 0.3, 0.3, 1)
-            </OnLoad>
-        </Scripts>
     </Frame>
 </Ui>
diff --git a/src/xml/settings/mainBarSettings.xml b/src/xml/settings/mainBarSettings.xml
index e69de29..a1940c0 100644
--- a/src/xml/settings/mainBarSettings.xml
+++ b/src/xml/settings/mainBarSettings.xml
@@ -0,0 +1,44 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
+    <Frame name="DJBagsMainBarSettings" hidden="false" virtual="true">
+        <Size x="500" y="65"/>
+        <Backdrop bgFile="Interface\ChatFrame\ChatFrameBackground" edgeFile="Interface\Buttons\WHITE8x8">
+            <EdgeSize>
+                <AbsValue val="1" />
+            </EdgeSize>
+            <Color r="0" g="0" b="0" a="0.6" />
+            <BorderColor r="0.3" g="0.3" b="0.3" a="1" />
+        </Backdrop>
+        <Layers>
+            <Layer level="ARTWORK">
+                <FontString name="$parentName" inherits="GameFontNormal" text="DJBags_LOCALE_MAIN_BAR_SETTINGS">
+                    <Anchors>
+                        <Anchor point="TOPLEFT" x="15" y="-5"/>
+                    </Anchors>
+                </FontString>
+            </Layer>
+        </Layers>
+        <Frames>
+            <Button name="$parentBackgroundColorSelect" inherits="DJBagsColorPickerTemplate" text="DJBags_LOCALE_BACKGROUND_COLOR">
+                <Anchors>
+                    <Anchor point="TOPLEFT" relativeTo="$parentName" relativePoint="BOTTOMLEFT" x="5" y="-15" />
+                </Anchors>
+                <Scripts>
+                    <OnShow>
+                        DJBagsInitSettingsColorPicker(self, DJBags_TYPE_MAIN_BAR, DJBags_SETTING_BACKGROUND_COLOR)
+                    </OnShow>
+                </Scripts>
+            </Button>
+            <Button name="$parentBorderColorSelect" inherits="DJBagsColorPickerTemplate" text="DJBags_LOCALE_BORDER_COLOR">
+                <Anchors>
+                    <Anchor point="LEFT" relativeTo="$parentBackgroundColorSelect" relativePoint="RIGHT" x="5" y="0" />
+                </Anchors>
+                <Scripts>
+                    <OnShow>
+                        DJBagsInitSettingsColorPicker(self, DJBags_TYPE_MAIN_BAR, DJBags_SETTING_BORDER_COLOR)
+                    </OnShow>
+                </Scripts>
+            </Button>
+        </Frames>
+    </Frame>
+</Ui>
diff --git a/src/xml/settings/settingsContainer.xml b/src/xml/settings/settingsContainer.xml
index e3364b5..d08b8e9 100644
--- a/src/xml/settings/settingsContainer.xml
+++ b/src/xml/settings/settingsContainer.xml
@@ -25,17 +25,32 @@
                     </Frame>
                     <Frame name="$parentSubClassSettings" inherits="DJBagsSubClassSettings">
                         <Anchors>
-                            <Anchor point="TOP" relativeTo="$parentMainSettings" relativePoint="BOTTOM" />
+                            <Anchor point="TOP" relativeTo="$parentMainSettings" relativePoint="BOTTOM" y="-5" />
+                        </Anchors>
+                    </Frame>
+                    <Frame name="$parentFormatSettings" inherits="DJBagsFormatSettings">
+                        <Anchors>
+                            <Anchor point="TOP" relativeTo="$parentSubClassSettings" relativePoint="BOTTOM" y="-5" />
                         </Anchors>
                     </Frame>
                     <Frame name="$parentItemContainerSettings" inherits="DJBagsItemContainerSettings">
                         <Anchors>
-                            <Anchor point="TOP" relativeTo="$parentSubClassSettings" relativePoint="BOTTOM" />
+                            <Anchor point="TOP" relativeTo="$parentFormatSettings" relativePoint="BOTTOM" y="-5" />
                         </Anchors>
                     </Frame>
                     <Frame name="$parentContainerSettings" inherits="DJBagsContainerSettings">
                         <Anchors>
-                            <Anchor point="TOP" relativeTo="$parentItemContainerSettings" relativePoint="BOTTOM" />
+                            <Anchor point="TOP" relativeTo="$parentItemContainerSettings" relativePoint="BOTTOM" y="-5" />
+                        </Anchors>
+                    </Frame>
+                    <Frame name="$parentMainBarSettings" inherits="DJBagsMainBarSettings">
+                        <Anchors>
+                            <Anchor point="TOP" relativeTo="$parentContainerSettings" relativePoint="BOTTOM" y="-5" />
+                        </Anchors>
+                    </Frame>
+                    <Frame name="$parentBankBarSettings" inherits="DJBagsBankBarSettings">
+                        <Anchors>
+                            <Anchor point="TOP" relativeTo="$parentMainBarSettings" relativePoint="BOTTOM" y="-5" />
                         </Anchors>
                     </Frame>
                 </Frames>
@@ -70,7 +85,7 @@
                     </OnMouseWheel>
                 </Scripts>
             </ScrollFrame>
-            <Slider name="$parentScrollBar" inherits="UIPanelScrollBarTemplate" minValue="0" maxValue="95" defaultValuie="1" valueStep="1">
+            <Slider name="$parentScrollBar" inherits="UIPanelScrollBarTemplate" minValue="0" maxValue="270" defaultValuie="1" valueStep="1">
                 <Backdrop bgFile="Interface\Buttons\UI-SliderBar-Background"
                           edgeFile="Interface\Buttons\UI-SliderBar-Border" tile="true">
                     <EdgeSize val="8"/>
@@ -99,8 +114,6 @@
                 self:SetScript("OnDragStop", self.StopMovingOrSizing)
                 self:SetUserPlaced(true)

-                self:SetBackdropColor(0, 0, 0, 0.6)
-                self:SetBackdropBorderColor(0.3, 0.3, 0.3, 1)
                 function self:Open()
                     self:Show()
                 end
diff --git a/src/xml/settings/subClassSettings.xml b/src/xml/settings/subClassSettings.xml
index 9c0b282..f473123 100644
--- a/src/xml/settings/subClassSettings.xml
+++ b/src/xml/settings/subClassSettings.xml
@@ -1,7 +1,14 @@
 <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
-    <Frame name="DJBagsSubClassSettings" inherits="DJBagsContainerTemplate" hidden="false" virtual="true">
-        <Size x="500" y="125"/>
+    <Frame name="DJBagsSubClassSettings" hidden="false" virtual="true">
+        <Size x="500" y="150"/>
+        <Backdrop bgFile="Interface\ChatFrame\ChatFrameBackground" edgeFile="Interface\Buttons\WHITE8x8">
+            <EdgeSize>
+                <AbsValue val="1" />
+            </EdgeSize>
+            <Color r="0" g="0" b="0" a="0.6" />
+            <BorderColor r="0.3" g="0.3" b="0.3" a="1" />
+        </Backdrop>
         <Layers>
             <Layer level="ARTWORK">
                 <FontString name="$parentName" inherits="GameFontNormal" text="DJBags_LOCALE_SUB_CLASS_SETTINGS">
@@ -102,12 +109,26 @@
                     </OnShow>
                 </Scripts>
             </CheckButton>
+            <CheckButton name="$parentBOECheckBox" inherits="DJBagsSettingsCheckBoxTemplate">
+                <Anchors>
+                    <Anchor point="TOP" relativeTo="$parentRecipesCheckBox" relativePoint="BOTTOM" />
+                </Anchors>
+                <Scripts>
+                    <OnShow>
+                        DJBagsInitSettingsCheckBox(self, DJBags_LOCALE_BOE, DJBags_TYPE_SUB_CLASS, DJBags_SETTING_BOE, 2)
+                    </OnShow>
+                </Scripts>
+            </CheckButton>
+            <CheckButton name="$parentBOACheckBox" inherits="DJBagsSettingsCheckBoxTemplate">
+                <Anchors>
+                    <Anchor point="LEFT" relativeTo="$parentBOECheckBox" relativePoint="RIGHT" x="140" />
+                </Anchors>
+                <Scripts>
+                    <OnShow>
+                        DJBagsInitSettingsCheckBox(self, DJBags_LOCALE_BOA, DJBags_TYPE_SUB_CLASS, DJBags_SETTING_BOA, 2)
+                    </OnShow>
+                </Scripts>
+            </CheckButton>
         </Frames>
-        <Scripts>
-            <OnLoad>
-                self:SetBackdropColor(0, 0, 0, 0.6)
-                self:SetBackdropBorderColor(0.3, 0.3, 0.3, 1)
-            </OnLoad>
-        </Scripts>
     </Frame>
 </Ui>
diff --git a/src/xml/settings/toggleSettings.xml b/src/xml/settings/toggleSettings.xml
index 296e473..c75407c 100644
--- a/src/xml/settings/toggleSettings.xml
+++ b/src/xml/settings/toggleSettings.xml
@@ -1,7 +1,14 @@
 <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
-    <Frame name="DJBagsMainSettings" inherits="DJBagsContainerTemplate" hidden="false" virtual="true">
+    <Frame name="DJBagsMainSettings" hidden="false" virtual="true">
         <Size x="500" y="115"/>
+        <Backdrop bgFile="Interface\ChatFrame\ChatFrameBackground" edgeFile="Interface\Buttons\WHITE8x8">
+            <EdgeSize>
+                <AbsValue val="1" />
+            </EdgeSize>
+            <Color r="0" g="0" b="0" a="0.6" />
+            <BorderColor r="0.3" g="0.3" b="0.3" a="1" />
+        </Backdrop>
         <Layers>
             <Layer level="ARTWORK">
                 <FontString name="$parentName" inherits="GameFontNormal" text="DJBags_LOCALE_SUB_CLASS_SETTINGS">
@@ -57,11 +64,5 @@
                 </Scripts>
             </Slider>
         </Frames>
-        <Scripts>
-            <OnLoad>
-                self:SetBackdropColor(0, 0, 0, 0.6)
-                self:SetBackdropBorderColor(0.3, 0.3, 0.3, 1)
-            </OnLoad>
-        </Scripts>
     </Frame>
 </Ui>