From 411aea5a6bd12804dce1e2dcc98778c4d54533b4 Mon Sep 17 00:00:00 2001 From: Salikh Gurgenidze Date: Sat, 22 Nov 2025 01:07:07 +0400 Subject: [PATCH] remove moneydisplay --- Guda.toc | 1 - UI/MoneyDisplay.lua | 57 --------------------------------------------- 2 files changed, 58 deletions(-) delete mode 100644 UI/MoneyDisplay.lua diff --git a/Guda.toc b/Guda.toc index 550365c..9af38fc 100644 --- a/Guda.toc +++ b/Guda.toc @@ -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 diff --git a/UI/MoneyDisplay.lua b/UI/MoneyDisplay.lua deleted file mode 100644 index dc764a0..0000000 --- a/UI/MoneyDisplay.lua +++ /dev/null @@ -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