remove moneydisplay

This commit is contained in:
Salikh Gurgenidze
2025-11-22 01:07:07 +04:00
parent 9641229d1a
commit 411aea5a6b
2 changed files with 0 additions and 58 deletions
-1
View File
@@ -25,7 +25,6 @@ Sorting\SortEngine.lua
UI\ItemButton.lua
UI\BagFrame.lua
UI\BankFrame.lua
UI\MoneyDisplay.lua
UI\SettingsPopup.lua
UI\ItemButton.xml
-57
View File
@@ -1,57 +0,0 @@
-- Guda Money Display
-- Handles money display in UI
local addon = Guda
local MoneyDisplay = {}
addon.Modules.MoneyDisplay = MoneyDisplay
-- Create a money display frame
function MoneyDisplay:CreateDisplay(parent, x, y)
local frame = CreateFrame("Frame", nil, parent)
frame:SetPoint("TOPLEFT", parent, "TOPLEFT", x, y)
frame:SetWidth(200)
frame:SetHeight(20)
-- Gold text
frame.gold = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
frame.gold:SetPoint("LEFT", frame, "LEFT", 0, 0)
-- Silver text
frame.silver = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
frame.silver:SetPoint("LEFT", frame.gold, "RIGHT", 2, 0)
-- Copper text
frame.copper = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
frame.copper:SetPoint("LEFT", frame.silver, "RIGHT", 2, 0)
return frame
end
-- Update money display
function MoneyDisplay:Update(frame, copper)
if not frame or not copper then
return
end
local gold = math.floor(copper / 10000)
local silver = math.floor(mod(copper, 10000) / 100)
local bronze = mod(copper, 100)
if gold > 0 then
frame.gold:SetText(gold .. "|cFFFFD700g|r")
frame.gold:Show()
else
frame.gold:Hide()
end
if silver > 0 or gold > 0 then
frame.silver:SetText(silver .. "|cFFC0C0C0s|r")
frame.silver:Show()
else
frame.silver:Hide()
end
frame.copper:SetText(bronze .. "|cFFFF6600c|r")
frame.copper:Show()
end