diff --git a/rBag/core.lua b/rBag/core.lua index cca958a..d4b749b 100644 --- a/rBag/core.lua +++ b/rBag/core.lua @@ -291,7 +291,7 @@ function Bags:SlotUpdate(id, button) if Rarity then button.Backdrop:SetBackdropBorderColor(GetItemQualityColor(Rarity)) else - button.Backdrop:SetBackdropBorderColor(unpack(rButtonTemplate_Zork_SlotButtonConfig.backdrop.borderColor)) + button.Backdrop:SetBackdropBorderColor(unpack(L.C.button.backdrop.borderColor)) end end @@ -486,7 +486,7 @@ function Bags:UpdateAllBags() LastButton = Button - rButtonTemplate:StyleItemButton(Button, rButtonTemplate_Zork_SlotButtonConfig) + rButtonTemplate:StyleItemButton(Button, L.C.button) Button:SetFrameLevel(0) Button.Backdrop:SetFrameLevel(Button:GetFrameLevel()) @@ -556,7 +556,7 @@ function Bags:UpdateAllBankBags() NumButtons = NumButtons + 1 end - rButtonTemplate:StyleItemButton(Button, rButtonTemplate_Zork_SlotButtonConfig) + rButtonTemplate:StyleItemButton(Button, L.C.button) Button:SetFrameLevel(0) Button.Backdrop:SetFrameLevel(Button:GetFrameLevel()) Bags.SlotUpdate(self, -1, Button) @@ -590,7 +590,7 @@ function Bags:UpdateAllBankBags() NumButtons = NumButtons + 1 end - rButtonTemplate:StyleItemButton(Button, rButtonTemplate_Zork_SlotButtonConfig) + rButtonTemplate:StyleItemButton(Button, L.C.button) Button:SetFrameLevel(0) Button.Backdrop:SetFrameLevel(Button:GetFrameLevel()) Bags.SlotUpdate(self, Bag - 1, Button) diff --git a/rBag/init.lua b/rBag/init.lua index 7809254..ffb191a 100644 --- a/rBag/init.lua +++ b/rBag/init.lua @@ -60,4 +60,53 @@ cfg.bank = { extraHeight = 40, } +cfg.button = { + --backdrop + backdrop = { + bgFile = "Interface\\AddOns\\rButtonTemplate_Zork\\media\\backdrop", + edgeFile = "Interface\\AddOns\\rButtonTemplate_Zork\\media\\backdropBorder", + tile = false, + tileSize = 1, + edgeSize = 1, + insets = {left=0,right=0,top=0,bottom=0}, + backgroundColor = {0.1,0.1,0.1,0.8}, + borderColor = {0,0,0,1}, + points = { + {"TOPLEFT",0,0}, + {"BOTTOMRIGHT",0,0} + }, + }, + --icon + icon = { + texCoord = {0.1,0.9,0.1,0.9}, + points = { + {"TOPLEFT",1,-1}, + {"BOTTOMRIGHT",-1,1}, + }, + }, + --border + border = { + file = _G["ActionButton1Border"]:GetTexture(), + blendMode = "ADD", + sizeFactor = 1.8, + texCoord = {0,1,0,1}, + alpha = 0 + }, + --normalTexture + normalTexture = {file=""}, + --pushedTexture + pushedTexture = {file=""}, + --highlightTexture + highlightTexture = {file=""}, + --checkedTexture + checkedTexture = {file=""}, + --count + count = { + font = { cfg.font,11,"OUTLINE"}, + points = { + {"BOTTOMRIGHT",0,0}, + }, + } +} + L.C = cfg \ No newline at end of file diff --git a/rBag/rBag.toc b/rBag/rBag.toc index f8d5279..bb14fa0 100644 --- a/rBag/rBag.toc +++ b/rBag/rBag.toc @@ -2,7 +2,7 @@ ## Author: rawoil ## Title: rBag |cff1a9fc0BCC|r ## Notes: Inventory enhancements -## RequiredDeps: rLib, rButtonTemplate_Zork +## RequiredDeps: rLib, rButtonTemplate libs/SortBags.lua diff --git a/rButtonTemplate_Zork/theme.lua b/rButtonTemplate_Zork/theme.lua index add0c7b..1d998de 100644 --- a/rButtonTemplate_Zork/theme.lua +++ b/rButtonTemplate_Zork/theme.lua @@ -171,18 +171,6 @@ for i, button in next, itemButtons do rButtonTemplate:StyleItemButton(button, itemButtonConfig) end ---make item config global for rBag -rButtonTemplate_Zork_SlotButtonConfig = itemButtonConfig -rButtonTemplate_Zork_SlotButtonConfig.backdrop.points = { - {"TOPLEFT", 0, 0 }, - {"BOTTOMRIGHT", 0, 0 }, -} -rButtonTemplate_Zork_SlotButtonConfig.backdrop.edgeSize = 1 -rButtonTemplate_Zork_SlotButtonConfig.backdrop.insets = {left = 0,right = 0,top = 0,bottom = 0} -rButtonTemplate_Zork_SlotButtonConfig.border.alpha = 0 -rButtonTemplate_Zork_SlotButtonConfig.normalTexture.file = "" -rButtonTemplate_Zork_SlotButtonConfig.pushedTexture = {file = ""} - ----------------------------- -- extraButtonConfig -----------------------------