From c08c08063dde9435890407b6ce7b2389f020783d Mon Sep 17 00:00:00 2001 From: Salikh Gurgenidze Date: Wed, 19 Nov 2025 17:49:49 +0400 Subject: [PATCH] Prepare for release 1.0.1 --- Core/Main.lua | 5 -- Guda.toc | 2 - UI/CharacterSelector.lua | 128 --------------------------------------- UI/CharacterSelector.xml | 115 ----------------------------------- 4 files changed, 250 deletions(-) delete mode 100644 UI/CharacterSelector.lua delete mode 100644 UI/CharacterSelector.xml diff --git a/Core/Main.lua b/Core/Main.lua index 837fd45..97eba3b 100644 --- a/Core/Main.lua +++ b/Core/Main.lua @@ -63,7 +63,6 @@ end function Main:SetupSlashCommands() SLASH_Guda1 = "/Guda" SLASH_Guda2 = "/guda" - SLASH_Guda3 = "/gn" SlashCmdList["Guda"] = function(msg) msg = string.lower(msg or "") @@ -76,10 +75,6 @@ function Main:SetupSlashCommands() -- Toggle bank addon.Modules.BankFrame:Toggle() - elseif msg == "char" or msg == "chars" or msg == "characters" then - -- Toggle character selector - addon.Modules.CharacterSelector:Toggle() - elseif msg == "sort" then -- Sort bags addon.Modules.SortEngine:SortBags() diff --git a/Guda.toc b/Guda.toc index dd32d3d..d738940 100644 --- a/Guda.toc +++ b/Guda.toc @@ -23,14 +23,12 @@ Sorting\SortEngine.lua UI\ItemButton.lua UI\BagFrame.lua UI\BankFrame.lua -UI\CharacterSelector.lua UI\MoneyDisplay.lua UI\SettingsPopup.lua UI\ItemButton.xml UI\BagFrame.xml UI\BankFrame.xml -UI\CharacterSelector.xml UI\SettingsPopup.xml Core\Main.lua diff --git a/UI/CharacterSelector.lua b/UI/CharacterSelector.lua deleted file mode 100644 index d093d8a..0000000 --- a/UI/CharacterSelector.lua +++ /dev/null @@ -1,128 +0,0 @@ --- Guda Character Selector --- Select character to view bags/bank - -local addon = Guda - -local CharacterSelector = {} -addon.Modules.CharacterSelector = CharacterSelector - -local charButtons = {} - --- OnLoad -function Guda_CharacterSelector_OnLoad(self) - getglobal(self:GetName().."_Title"):SetText("Select Character") - addon:Debug("Character selector loaded") -end - --- OnShow -function Guda_CharacterSelector_OnShow(self) - CharacterSelector:Update() -end - --- Toggle visibility -function CharacterSelector:Toggle() - if Guda_CharacterSelector:IsShown() then - Guda_CharacterSelector:Hide() - else - Guda_CharacterSelector:Show() - end -end - --- Update character list -function CharacterSelector:Update() - -- Clear existing buttons - for _, button in ipairs(charButtons) do - button:Hide() - end - charButtons = {} - - -- Get all characters - local characters = addon.Modules.DB:GetAllCharacters(true) -- Same faction only - local characterList = getglobal("Guda_CharacterSelector_CharacterList") - - -- Create buttons for each character - local yOffset = -10 - for i, char in ipairs(characters) do - local button = self:GetCharacterButton(i) - - -- Set text with class color - local classColor = addon.Modules.Utils:GetClassColor(char.class) - local coloredName = addon.Modules.Utils:ColorText(char.name, classColor.r, classColor.g, classColor.b) - - button:SetText(string.format("%s (Lv %d)", coloredName, char.level)) - button.charData = char - - -- Position - button:ClearAllPoints() - button:SetPoint("TOP", characterList, "TOP", 0, yOffset) - yOffset = yOffset - 35 - - button:Show() - table.insert(charButtons, button) - end - - if table.getn(characters) == 0 then - addon:Debug("No other characters found") - end -end - --- Get or create character button -function CharacterSelector:GetCharacterButton(index) - local name = "Guda_CharButton" .. index - local characterList = getglobal("Guda_CharacterSelector_CharacterList") - - local button = getglobal(name) - if not button then - button = CreateFrame("Button", name, characterList, "Guda_CharacterButtonTemplate") - end - - return button -end - --- Character button OnClick -function Guda_CharacterButton_OnClick(self) - if not self.charData then - return - end - - addon:Print("Viewing %s's bags", self.charData.name) - - -- Show bags for this character - addon.Modules.BagFrame:ShowCharacter(self.charData.fullName) - - -- Close selector - Guda_CharacterSelector:Hide() - - -- Show bag frame if not visible - if not Guda_BagFrame:IsShown() then - Guda_BagFrame:Show() - end -end - --- Character button OnEnter -function Guda_CharacterButton_OnEnter(self) - if not self.charData then - return - end - - GameTooltip:SetOwner(self, "ANCHOR_RIGHT") - GameTooltip:AddLine(self.charData.name, 1, 1, 1) - GameTooltip:AddLine("Level " .. self.charData.level .. " " .. self.charData.class, 0.7, 0.7, 0.7) - GameTooltip:AddLine("Money: " .. addon.Modules.Utils:FormatMoney(self.charData.money)) - - if self.charData.lastUpdate then - GameTooltip:AddLine("Last seen: " .. addon.Modules.Utils:FormatTimeAgo(self.charData.lastUpdate), 0.5, 0.5, 0.5) - end - - GameTooltip:Show() -end - --- Show current character -function Guda_CharacterSelector_ShowCurrent() - addon.Modules.BagFrame:ShowCurrentCharacter() - Guda_CharacterSelector:Hide() - - if not Guda_BagFrame:IsShown() then - Guda_BagFrame:Show() - end -end diff --git a/UI/CharacterSelector.xml b/UI/CharacterSelector.xml deleted file mode 100644 index e205d8d..0000000 --- a/UI/CharacterSelector.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Guda_CharacterSelector_OnLoad(this) - - - Guda_CharacterSelector_OnShow(this) - - - if (arg1 == "LeftButton") then - this:StartMoving() - end - - - this:StopMovingOrSizing() - - - - -