fix: show money for all characters
This commit is contained in:
+5
-1
@@ -44,6 +44,10 @@ end
|
||||
|
||||
-- OnShow
|
||||
function Guda_BagFrame_OnShow(self)
|
||||
-- Save bag data when opening bags
|
||||
addon.Modules.BagScanner:SaveToDatabase()
|
||||
addon.Modules.MoneyTracker:Update()
|
||||
|
||||
-- Restore saved position if it exists (only if saved as BOTTOMRIGHT)
|
||||
if addon and addon.Modules and addon.Modules.DB then
|
||||
local pos = addon.Modules.DB:GetSetting("bagFramePosition")
|
||||
@@ -340,7 +344,7 @@ end
|
||||
|
||||
-- Money tooltip handler
|
||||
function Guda_BagFrame_MoneyOnEnter(self)
|
||||
GameTooltip:SetOwner(self, "ANCHOR_TOP")
|
||||
GameTooltip:SetOwner(self, "ANCHOR_BOTTOM")
|
||||
GameTooltip:ClearLines()
|
||||
|
||||
-- Get all characters and total
|
||||
|
||||
+25
-4
@@ -59,8 +59,10 @@ function Guda_ItemButton_SetItem(self, bagID, slotID, itemData, isBank, otherCha
|
||||
-- Resize empty slot background to match icon size (slightly larger to ensure coverage)
|
||||
if emptySlotBg then
|
||||
emptySlotBg:ClearAllPoints()
|
||||
emptySlotBg:SetPoint("TOPLEFT", self, "TOPLEFT", -2, 2)
|
||||
emptySlotBg:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", 2, -2)
|
||||
-- Use smaller padding for small icons
|
||||
local bgPadding = iconSize < 44 and 1 or 2
|
||||
emptySlotBg:SetPoint("TOPLEFT", self, "TOPLEFT", -bgPadding, bgPadding)
|
||||
emptySlotBg:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", bgPadding, -bgPadding)
|
||||
-- Crop texture edges slightly to remove any built-in padding
|
||||
emptySlotBg:SetTexCoord(0.1, 0.9, 0.1, 0.9)
|
||||
end
|
||||
@@ -114,6 +116,16 @@ function Guda_ItemButton_SetItem(self, bagID, slotID, itemData, isBank, otherCha
|
||||
local font, _, flags = countText:GetFont()
|
||||
local fontSize = Guda.Modules.DB:GetSetting("iconFontSize") or 12
|
||||
countText:SetFont(font, fontSize, flags)
|
||||
|
||||
-- Adjust count text position based on icon size for better alignment
|
||||
countText:ClearAllPoints()
|
||||
if iconSize < 44 then
|
||||
-- Smaller offset for small icons
|
||||
countText:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -3, 3)
|
||||
else
|
||||
-- Standard offset for larger icons
|
||||
countText:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -8, 8)
|
||||
end
|
||||
end
|
||||
|
||||
if itemData then
|
||||
@@ -204,8 +216,17 @@ function Guda_ItemButton_SetItem(self, bagID, slotID, itemData, isBank, otherCha
|
||||
|
||||
if iconTexture then
|
||||
if self.hasItem then
|
||||
-- Make icon 3px smaller than slot for nice inset effect
|
||||
local iconDisplaySize = iconSize - 15
|
||||
-- Scale icon proportionally based on button size
|
||||
-- For icons < 44: use smaller inset (4px) for better fit
|
||||
-- For icons >= 44: use larger inset (15px) for classic look
|
||||
local iconInset
|
||||
if iconSize < 44 then
|
||||
iconInset = 10 -- Small inset for small icons
|
||||
else
|
||||
iconInset = 15 -- Larger inset for larger icons
|
||||
end
|
||||
|
||||
local iconDisplaySize = iconSize - iconInset
|
||||
iconTexture:ClearAllPoints()
|
||||
iconTexture:SetPoint("CENTER", self, "CENTER", 0, 0)
|
||||
iconTexture:SetWidth(iconDisplaySize)
|
||||
|
||||
@@ -30,10 +30,10 @@ end
|
||||
function Guda_SettingsPopup_OnShow(self)
|
||||
-- Load current settings
|
||||
local bagColumns = Guda.Modules.DB:GetSetting("bagColumns") or 10
|
||||
local bankColumns = Guda.Modules.DB:GetSetting("bankColumns") or 15
|
||||
local iconSize = Guda.Modules.DB:GetSetting("iconSize") or addon.Constants.BUTTON_SIZE
|
||||
local bankColumns = Guda.Modules.DB:GetSetting("bankColumns") or 10
|
||||
local iconSize = Guda.Modules.DB:GetSetting("iconSize") or 40
|
||||
local iconFontSize = Guda.Modules.DB:GetSetting("iconFontSize") or 12
|
||||
local iconSpacing = Guda.Modules.DB:GetSetting("iconSpacing") or 4
|
||||
local iconSpacing = Guda.Modules.DB:GetSetting("iconSpacing") or 0
|
||||
local lockBags = Guda.Modules.DB:GetSetting("lockBags")
|
||||
if lockBags == nil then
|
||||
lockBags = false
|
||||
@@ -139,7 +139,7 @@ function Guda_SettingsPopup_BankColumnsSlider_OnLoad(self)
|
||||
self:SetMinMaxValues(5, 20)
|
||||
self:SetValueStep(1)
|
||||
|
||||
local currentValue = Guda.Modules.DB:GetSetting("bankColumns") or 15
|
||||
local currentValue = Guda.Modules.DB:GetSetting("bankColumns") or 10
|
||||
self:SetValue(currentValue)
|
||||
end
|
||||
|
||||
@@ -162,7 +162,7 @@ end
|
||||
|
||||
-- Icon Size Slider OnLoad
|
||||
function Guda_SettingsPopup_IconSizeSlider_OnLoad(self)
|
||||
getglobal(self:GetName().."Low"):SetText("24px")
|
||||
getglobal(self:GetName().."Low"):SetText("30px")
|
||||
getglobal(self:GetName().."High"):SetText("64px")
|
||||
|
||||
local text = getglobal(self:GetName().."Text")
|
||||
@@ -174,7 +174,7 @@ function Guda_SettingsPopup_IconSizeSlider_OnLoad(self)
|
||||
text:SetFont(font, 12, flags)
|
||||
end
|
||||
|
||||
self:SetMinMaxValues(24, 64)
|
||||
self:SetMinMaxValues(30, 64)
|
||||
self:SetValueStep(1)
|
||||
|
||||
local currentValue = Guda.Modules.DB:GetSetting("iconSize") or addon.Constants.BUTTON_SIZE
|
||||
@@ -257,7 +257,7 @@ function Guda_SettingsPopup_IconSpacingSlider_OnLoad(self)
|
||||
self:SetMinMaxValues(-5, 10)
|
||||
self:SetValueStep(1)
|
||||
|
||||
local currentValue = Guda.Modules.DB:GetSetting("iconSpacing") or 4
|
||||
local currentValue = Guda.Modules.DB:GetSetting("iconSpacing") or 0
|
||||
self:SetValue(currentValue)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user