diff --git a/Guda.toc b/Guda.toc
index 40419e6..2a27e7a 100644
--- a/Guda.toc
+++ b/Guda.toc
@@ -2,7 +2,7 @@
## Title: Guda
## Notes: All-in-one bag and bank addon for World of Warcraft 1.12.1 (Turtle WoW)
## Author: Vati
-## Version: 1.5.7
+## Version: 1.5.8
## SavedVariables: Guda_DB
## SavedVariablesPerCharacter: Guda_CharDB
diff --git a/UI/SettingsPopup.lua b/UI/SettingsPopup.lua
index 5cf18f8..3521c62 100644
--- a/UI/SettingsPopup.lua
+++ b/UI/SettingsPopup.lua
@@ -27,15 +27,8 @@ function Guda_SettingsPopup_OnLoad(self)
title:SetFont(titleFont, 16, titleFlags)
end
- -- Set tab names
- PanelTemplates_SetNumTabs(self, 3)
- getglobal(self:GetName().."Tab1"):SetText("General")
- getglobal(self:GetName().."Tab2"):SetText("Icons")
- getglobal(self:GetName().."Tab3"):SetText("Quick Guide")
- PanelTemplates_SetTab(self, 1)
-
-- Set How to Use text
- local instructions = getglobal(self:GetName().."_HowToUseTab_Instructions")
+ local instructions = getglobal("Guda_SettingsPopup_GuideTab_Instructions")
if instructions then
local text = "|cffffd100Tracking Items:|r\n" ..
"Alt + Left Click on any item in your bags to track it.\n" ..
@@ -54,30 +47,43 @@ function Guda_SettingsPopup_OnLoad(self)
Guda:Debug("Settings popup loaded")
end
--- Tab switching logic
-function Guda_SettingsPopup_Tab_OnClick(id)
- local frame = Guda_SettingsPopup
- PanelTemplates_SetTab(frame, id)
+-- Tab switching logic (GudaPlates style)
+function Guda_SettingsPopup_SelectTab(tabName)
+ -- Hide all tab content frames
+ local generalTab = getglobal("Guda_SettingsPopup_GeneralTab")
+ local iconsTab = getglobal("Guda_SettingsPopup_IconsTab")
+ local guideTab = getglobal("Guda_SettingsPopup_GuideTab")
- -- Hide all tabs
- getglobal(frame:GetName().."_GeneralTab"):Hide()
- getglobal(frame:GetName().."_IconsTab"):Hide()
- getglobal(frame:GetName().."_HowToUseTab"):Hide()
+ if generalTab then generalTab:Hide() end
+ if iconsTab then iconsTab:Hide() end
+ if guideTab then guideTab:Hide() end
- -- Show selected tab
- if id == 1 then
- getglobal(frame:GetName().."_GeneralTab"):Show()
- elseif id == 2 then
- getglobal(frame:GetName().."_IconsTab"):Show()
- else
- getglobal(frame:GetName().."_HowToUseTab"):Show()
+ -- Reset all tab button backgrounds to inactive (0.1 alpha)
+ local generalBg = getglobal("Guda_SettingsPopup_GeneralTabButton_Bg")
+ local iconsBg = getglobal("Guda_SettingsPopup_IconsTabButton_Bg")
+ local guideBg = getglobal("Guda_SettingsPopup_GuideTabButton_Bg")
+
+ if generalBg then generalBg:SetTexture(1, 1, 1, 0.1) end
+ if iconsBg then iconsBg:SetTexture(1, 1, 1, 0.1) end
+ if guideBg then guideBg:SetTexture(1, 1, 1, 0.1) end
+
+ -- Show selected tab and highlight its button
+ if tabName == "general" then
+ if generalTab then generalTab:Show() end
+ if generalBg then generalBg:SetTexture(1, 1, 1, 0.3) end
+ elseif tabName == "icons" then
+ if iconsTab then iconsTab:Show() end
+ if iconsBg then iconsBg:SetTexture(1, 1, 1, 0.3) end
+ elseif tabName == "guide" then
+ if guideTab then guideTab:Show() end
+ if guideBg then guideBg:SetTexture(1, 1, 1, 0.3) end
end
end
-- OnShow
function Guda_SettingsPopup_OnShow(self)
-- Default to General tab
- Guda_SettingsPopup_Tab_OnClick(1)
+ Guda_SettingsPopup_SelectTab("general")
-- Load current settings
local bagColumns = Guda.Modules.DB:GetSetting("bagColumns") or 10
@@ -214,11 +220,6 @@ function Guda_SettingsPopup_OnShow(self)
end
- -- Update display (might be too tall for current frame size)
- local frame = getglobal("Guda_SettingsPopup")
- if frame then
- frame:SetHeight(600)
- end
-- Apply border visibility
if SettingsPopup.UpdateBorderVisibility then
diff --git a/UI/SettingsPopup.xml b/UI/SettingsPopup.xml
index eed870f..4ca31e4 100644
--- a/UI/SettingsPopup.xml
+++ b/UI/SettingsPopup.xml
@@ -3,7 +3,7 @@
-
+
@@ -14,12 +14,12 @@
-
+
-
+
@@ -33,7 +33,7 @@
-
+
@@ -43,56 +43,12 @@
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
@@ -131,10 +196,10 @@
-
+
-
+
@@ -153,10 +218,10 @@
-
+
-
+
@@ -175,9 +240,9 @@
-
+
-
+
@@ -196,7 +261,7 @@
-
+
@@ -213,7 +278,7 @@
-
+
@@ -234,7 +299,7 @@
-
+
@@ -251,7 +316,7 @@
-
+
@@ -272,7 +337,7 @@
-
+
@@ -289,7 +354,7 @@
-
+
@@ -305,12 +370,12 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
@@ -380,10 +437,10 @@
-
+
-
+
@@ -402,10 +459,10 @@
-
+
-
+
@@ -424,9 +481,9 @@
-
+
-
+
@@ -445,7 +502,7 @@
-
+
@@ -462,7 +519,7 @@
-
+
@@ -483,7 +540,7 @@
-
+
@@ -496,10 +553,40 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+