feat: quick guide

This commit is contained in:
Salikh Gurgenidze
2025-12-23 04:42:15 +04:00
parent 04488dadf2
commit 0c55cd80ba
3 changed files with 364 additions and 271 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
## Title: Guda ## Title: Guda
## Notes: All-in-one bag and bank addon for Turtle WoW ## Notes: All-in-one bag and bank addon for Turtle WoW
## Author: Vati ## Author: Vati
## Version: 1.3.1 ## Version: 1.3.2
## SavedVariables: Guda_DB ## SavedVariables: Guda_DB
## SavedVariablesPerCharacter: Guda_CharDB ## SavedVariablesPerCharacter: Guda_CharDB
+39
View File
@@ -26,11 +26,50 @@ function Guda_SettingsPopup_OnLoad(self)
if titleFont then if titleFont then
title:SetFont(titleFont, 16, titleFlags) title:SetFont(titleFont, 16, titleFlags)
end end
-- Set tab names
PanelTemplates_SetNumTabs(self, 2)
getglobal(self:GetName().."Tab1"):SetText("General")
getglobal(self:GetName().."Tab2"):SetText("Quick Guide")
PanelTemplates_SetTab(self, 1)
-- Set How to Use text
local instructions = getglobal(self:GetName().."_HowToUseTab_Instructions")
if instructions then
local text = "|cffffd100Tracking Items:|r\n" ..
"Ctrl + Left Click on any item in your bags to track it.\n" ..
"Tracked items will appear in the Tracked Item Bar.\n" ..
"Ctrl + Left Click on an item in the bar to untrack it.\n\n" ..
"|cffffd100Moving Bars:|r\n" ..
"Shift + Left Click and drag any item on the Quest Item Bar or Tracked Item Bar to move the bar.\n" ..
"You can also drag the bar background if it's visible.\n\n" ..
"|cffffd100Quest Item Bar:|r\n" ..
"Alt + Left Click on a quest item in your bags to pin it to the bar."
instructions:SetText(text)
end
Guda:Debug("Settings popup loaded") Guda:Debug("Settings popup loaded")
end end
-- Tab switching logic
function Guda_SettingsPopup_Tab_OnClick(id)
local frame = Guda_SettingsPopup
PanelTemplates_SetTab(frame, id)
if id == 1 then
getglobal(frame:GetName().."_GeneralTab"):Show()
getglobal(frame:GetName().."_HowToUseTab"):Hide()
else
getglobal(frame:GetName().."_GeneralTab"):Hide()
getglobal(frame:GetName().."_HowToUseTab"):Show()
end
end
-- OnShow -- OnShow
function Guda_SettingsPopup_OnShow(self) function Guda_SettingsPopup_OnShow(self)
-- Default to General tab
Guda_SettingsPopup_Tab_OnClick(1)
-- Load current settings -- Load current settings
local bagColumns = Guda.Modules.DB:GetSetting("bagColumns") or 10 local bagColumns = Guda.Modules.DB:GetSetting("bagColumns") or 10
local bankColumns = Guda.Modules.DB:GetSetting("bankColumns") or 10 local bankColumns = Guda.Modules.DB:GetSetting("bankColumns") or 10
+324 -270
View File
@@ -43,6 +43,36 @@
</Layers> </Layers>
<Frames> <Frames>
<!-- Tabs -->
<Button name="$parentTab1" inherits="CharacterFrameTabButtonTemplate" id="1">
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent">
<Offset>
<AbsDimension x="11" y="-30"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
Guda_SettingsPopup_Tab_OnClick(1)
</OnClick>
</Scripts>
</Button>
<Button name="$parentTab2" inherits="CharacterFrameTabButtonTemplate" id="2">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentTab1" relativePoint="RIGHT">
<Offset>
<AbsDimension x="-16" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
Guda_SettingsPopup_Tab_OnClick(2)
</OnClick>
</Scripts>
</Button>
<!-- Close Button --> <!-- Close Button -->
<Button name="$parent_CloseButton" inherits="UIPanelCloseButton"> <Button name="$parent_CloseButton" inherits="UIPanelCloseButton">
<Anchors> <Anchors>
@@ -59,290 +89,314 @@
</Scripts> </Scripts>
</Button> </Button>
<!-- Bag Columns Slider --> <!-- General Tab Content -->
<Slider name="$parent_BagColumnsSlider" inherits="OptionsSliderTemplate"> <Frame name="$parent_GeneralTab" setAllPoints="true">
<Size> <Frames>
<AbsDimension x="370" y="17"/> <!-- Bag Columns Slider -->
</Size> <Slider name="Guda_SettingsPopup_BagColumnsSlider" inherits="OptionsSliderTemplate">
<Anchors> <Size>
<Anchor point="TOP"> <AbsDimension x="370" y="17"/>
<Offset> </Size>
<AbsDimension x="0" y="-90"/> <Anchors>
</Offset> <Anchor point="TOP">
</Anchor> <Offset>
</Anchors> <AbsDimension x="0" y="-90"/>
<Scripts> </Offset>
<OnLoad> </Anchor>
Guda_SettingsPopup_BagColumnsSlider_OnLoad(this) </Anchors>
</OnLoad> <Scripts>
<OnValueChanged> <OnLoad>
Guda_SettingsPopup_BagColumnsSlider_OnValueChanged(this) Guda_SettingsPopup_BagColumnsSlider_OnLoad(this)
</OnValueChanged> </OnLoad>
</Scripts> <OnValueChanged>
</Slider> Guda_SettingsPopup_BagColumnsSlider_OnValueChanged(this)
</OnValueChanged>
</Scripts>
</Slider>
<!-- Bank Columns Slider --> <!-- Bank Columns Slider -->
<Slider name="$parent_BankColumnsSlider" inherits="OptionsSliderTemplate"> <Slider name="Guda_SettingsPopup_BankColumnsSlider" inherits="OptionsSliderTemplate">
<Size> <Size>
<AbsDimension x="370" y="17"/> <AbsDimension x="370" y="17"/>
</Size> </Size>
<Anchors> <Anchors>
<Anchor point="TOP" relativePoint="BOTTOM" relativeTo="$parent_BagColumnsSlider"> <Anchor point="TOP" relativePoint="BOTTOM" relativeTo="Guda_SettingsPopup_BagColumnsSlider">
<Offset> <Offset>
<AbsDimension x="0" y="-40"/> <AbsDimension x="0" y="-40"/>
</Offset> </Offset>
</Anchor> </Anchor>
</Anchors> </Anchors>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
Guda_SettingsPopup_BankColumnsSlider_OnLoad(this) Guda_SettingsPopup_BankColumnsSlider_OnLoad(this)
</OnLoad> </OnLoad>
<OnValueChanged> <OnValueChanged>
Guda_SettingsPopup_BankColumnsSlider_OnValueChanged(this) Guda_SettingsPopup_BankColumnsSlider_OnValueChanged(this)
</OnValueChanged> </OnValueChanged>
</Scripts> </Scripts>
</Slider> </Slider>
<!-- Icon Size Slider --> <!-- Icon Size Slider -->
<Slider name="$parent_IconSizeSlider" inherits="OptionsSliderTemplate"> <Slider name="Guda_SettingsPopup_IconSizeSlider" inherits="OptionsSliderTemplate">
<Size> <Size>
<AbsDimension x="370" y="17"/> <AbsDimension x="370" y="17"/>
</Size> </Size>
<Anchors> <Anchors>
<Anchor point="TOP" relativePoint="BOTTOM" relativeTo="$parent_BankColumnsSlider"> <Anchor point="TOP" relativePoint="BOTTOM" relativeTo="Guda_SettingsPopup_BankColumnsSlider">
<Offset> <Offset>
<AbsDimension x="0" y="-40"/> <AbsDimension x="0" y="-40"/>
</Offset> </Offset>
</Anchor> </Anchor>
</Anchors> </Anchors>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
Guda_SettingsPopup_IconSizeSlider_OnLoad(this) Guda_SettingsPopup_IconSizeSlider_OnLoad(this)
</OnLoad> </OnLoad>
<OnValueChanged> <OnValueChanged>
Guda_SettingsPopup_IconSizeSlider_OnValueChanged(this) Guda_SettingsPopup_IconSizeSlider_OnValueChanged(this)
</OnValueChanged> </OnValueChanged>
</Scripts> </Scripts>
</Slider> </Slider>
<!-- Icon Font Size Slider --> <!-- Icon Font Size Slider -->
<Slider name="$parent_IconFontSizeSlider" inherits="OptionsSliderTemplate"> <Slider name="Guda_SettingsPopup_IconFontSizeSlider" inherits="OptionsSliderTemplate">
<Size> <Size>
<AbsDimension x="370" y="17"/> <AbsDimension x="370" y="17"/>
</Size> </Size>
<Anchors> <Anchors>
<Anchor point="TOP" relativePoint="BOTTOM" relativeTo="$parent_IconSizeSlider"> <Anchor point="TOP" relativePoint="BOTTOM" relativeTo="Guda_SettingsPopup_IconSizeSlider">
<Offset> <Offset>
<AbsDimension x="0" y="-40"/> <AbsDimension x="0" y="-40"/>
</Offset> </Offset>
</Anchor> </Anchor>
</Anchors> </Anchors>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
Guda_SettingsPopup_IconFontSizeSlider_OnLoad(this) Guda_SettingsPopup_IconFontSizeSlider_OnLoad(this)
</OnLoad> </OnLoad>
<OnValueChanged> <OnValueChanged>
Guda_SettingsPopup_IconFontSizeSlider_OnValueChanged(this) Guda_SettingsPopup_IconFontSizeSlider_OnValueChanged(this)
</OnValueChanged> </OnValueChanged>
</Scripts> </Scripts>
</Slider> </Slider>
<!-- Icon Spacing Slider --> <!-- Icon Spacing Slider -->
<Slider name="$parent_IconSpacingSlider" inherits="OptionsSliderTemplate"> <Slider name="Guda_SettingsPopup_IconSpacingSlider" inherits="OptionsSliderTemplate">
<Size> <Size>
<AbsDimension x="370" y="17"/> <AbsDimension x="370" y="17"/>
</Size> </Size>
<Anchors> <Anchors>
<Anchor point="TOP" relativePoint="BOTTOM" relativeTo="$parent_IconFontSizeSlider"> <Anchor point="TOP" relativePoint="BOTTOM" relativeTo="Guda_SettingsPopup_IconFontSizeSlider">
<Offset> <Offset>
<AbsDimension x="0" y="-40"/> <AbsDimension x="0" y="-40"/>
</Offset> </Offset>
</Anchor> </Anchor>
</Anchors> </Anchors>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
Guda_SettingsPopup_IconSpacingSlider_OnLoad(this) Guda_SettingsPopup_IconSpacingSlider_OnLoad(this)
</OnLoad> </OnLoad>
<OnValueChanged> <OnValueChanged>
Guda_SettingsPopup_IconSpacingSlider_OnValueChanged(this) Guda_SettingsPopup_IconSpacingSlider_OnValueChanged(this)
</OnValueChanged> </OnValueChanged>
</Scripts> </Scripts>
</Slider> </Slider>
<!-- Background Transparency Slider --> <!-- Background Transparency Slider -->
<Slider name="$parent_BgTransparencySlider" inherits="OptionsSliderTemplate"> <Slider name="Guda_SettingsPopup_BgTransparencySlider" inherits="OptionsSliderTemplate">
<Size> <Size>
<AbsDimension x="370" y="17"/> <AbsDimension x="370" y="17"/>
</Size> </Size>
<Anchors> <Anchors>
<Anchor point="TOP" relativePoint="BOTTOM" relativeTo="$parent_IconSpacingSlider"> <Anchor point="TOP" relativePoint="BOTTOM" relativeTo="Guda_SettingsPopup_IconSpacingSlider">
<Offset> <Offset>
<AbsDimension x="0" y="-40"/> <AbsDimension x="0" y="-40"/>
</Offset> </Offset>
</Anchor> </Anchor>
</Anchors> </Anchors>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
Guda_SettingsPopup_BgTransparencySlider_OnLoad(this) Guda_SettingsPopup_BgTransparencySlider_OnLoad(this)
</OnLoad> </OnLoad>
<OnValueChanged> <OnValueChanged>
Guda_SettingsPopup_BgTransparencySlider_OnValueChanged(this) Guda_SettingsPopup_BgTransparencySlider_OnValueChanged(this)
</OnValueChanged> </OnValueChanged>
</Scripts> </Scripts>
</Slider> </Slider>
<!-- Lock Bags Checkbox --> <!-- Lock Bags Checkbox -->
<CheckButton name="$parent_LockBagsCheckbox" inherits="OptionsCheckButtonTemplate"> <CheckButton name="Guda_SettingsPopup_LockBagsCheckbox" inherits="OptionsCheckButtonTemplate">
<Anchors> <Anchors>
<Anchor point="TOP" relativePoint="BOTTOM" relativeTo="$parent_BgTransparencySlider"> <Anchor point="TOP" relativePoint="BOTTOM" relativeTo="Guda_SettingsPopup_BgTransparencySlider">
<Offset> <Offset>
<AbsDimension x="-170" y="-30"/> <AbsDimension x="-170" y="-30"/>
</Offset> </Offset>
</Anchor> </Anchor>
</Anchors> </Anchors>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
Guda_SettingsPopup_LockBagsCheckbox_OnLoad(this) Guda_SettingsPopup_LockBagsCheckbox_OnLoad(this)
</OnLoad> </OnLoad>
<OnClick> <OnClick>
Guda_SettingsPopup_LockBagsCheckbox_OnClick(this) Guda_SettingsPopup_LockBagsCheckbox_OnClick(this)
</OnClick> </OnClick>
</Scripts> </Scripts>
</CheckButton> </CheckButton>
<!-- Hide Borders Checkbox --> <!-- Hide Borders Checkbox -->
<CheckButton name="$parent_HideBordersCheckbox" inherits="OptionsCheckButtonTemplate"> <CheckButton name="Guda_SettingsPopup_HideBordersCheckbox" inherits="OptionsCheckButtonTemplate">
<Anchors> <Anchors>
<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parent_LockBagsCheckbox"> <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="Guda_SettingsPopup_LockBagsCheckbox">
<Offset> <Offset>
<AbsDimension x="150" y="0"/> <AbsDimension x="150" y="0"/>
</Offset> </Offset>
</Anchor> </Anchor>
</Anchors> </Anchors>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
Guda_SettingsPopup_HideBordersCheckbox_OnLoad(this) Guda_SettingsPopup_HideBordersCheckbox_OnLoad(this)
</OnLoad> </OnLoad>
<OnClick> <OnClick>
Guda_SettingsPopup_HideBordersCheckbox_OnClick(this) Guda_SettingsPopup_HideBordersCheckbox_OnClick(this)
</OnClick> </OnClick>
</Scripts> </Scripts>
</CheckButton> </CheckButton>
<!-- Quality Border Equipment Checkbox --> <!-- Quality Border Equipment Checkbox -->
<CheckButton name="$parent_QualityBorderEquipmentCheckbox" inherits="OptionsCheckButtonTemplate"> <CheckButton name="Guda_SettingsPopup_QualityBorderEquipmentCheckbox" inherits="OptionsCheckButtonTemplate">
<Anchors> <Anchors>
<Anchor point="TOP" relativePoint="BOTTOM" relativeTo="$parent_LockBagsCheckbox"> <Anchor point="TOP" relativePoint="BOTTOM" relativeTo="Guda_SettingsPopup_LockBagsCheckbox">
<Offset> <Offset>
<AbsDimension x="0" y="-8"/> <AbsDimension x="0" y="-8"/>
</Offset> </Offset>
</Anchor> </Anchor>
</Anchors> </Anchors>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
Guda_SettingsPopup_QualityBorderEquipmentCheckbox_OnLoad(this) Guda_SettingsPopup_QualityBorderEquipmentCheckbox_OnLoad(this)
</OnLoad> </OnLoad>
<OnClick> <OnClick>
Guda_SettingsPopup_QualityBorderEquipmentCheckbox_OnClick(this) Guda_SettingsPopup_QualityBorderEquipmentCheckbox_OnClick(this)
</OnClick> </OnClick>
</Scripts> </Scripts>
</CheckButton> </CheckButton>
<!-- Quality Border Other Checkbox --> <!-- Quality Border Other Checkbox -->
<CheckButton name="$parent_QualityBorderOtherCheckbox" inherits="OptionsCheckButtonTemplate"> <CheckButton name="Guda_SettingsPopup_QualityBorderOtherCheckbox" inherits="OptionsCheckButtonTemplate">
<Anchors> <Anchors>
<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parent_QualityBorderEquipmentCheckbox"> <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="Guda_SettingsPopup_QualityBorderEquipmentCheckbox">
<Offset> <Offset>
<AbsDimension x="150" y="0"/> <AbsDimension x="150" y="0"/>
</Offset> </Offset>
</Anchor> </Anchor>
</Anchors> </Anchors>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
Guda_SettingsPopup_QualityBorderOtherCheckbox_OnLoad(this) Guda_SettingsPopup_QualityBorderOtherCheckbox_OnLoad(this)
</OnLoad> </OnLoad>
<OnClick> <OnClick>
Guda_SettingsPopup_QualityBorderOtherCheckbox_OnClick(this) Guda_SettingsPopup_QualityBorderOtherCheckbox_OnClick(this)
</OnClick> </OnClick>
</Scripts> </Scripts>
</CheckButton> </CheckButton>
<!-- Show Search Bar Checkbox --> <!-- Show Search Bar Checkbox -->
<CheckButton name="$parent_ShowSearchBarCheckbox" inherits="OptionsCheckButtonTemplate"> <CheckButton name="Guda_SettingsPopup_ShowSearchBarCheckbox" inherits="OptionsCheckButtonTemplate">
<Anchors> <Anchors>
<Anchor point="TOP" relativePoint="BOTTOM" relativeTo="$parent_QualityBorderEquipmentCheckbox"> <Anchor point="TOP" relativePoint="BOTTOM" relativeTo="Guda_SettingsPopup_QualityBorderEquipmentCheckbox">
<Offset> <Offset>
<AbsDimension x="0" y="-8"/> <AbsDimension x="0" y="-8"/>
</Offset> </Offset>
</Anchor> </Anchor>
</Anchors> </Anchors>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
Guda_SettingsPopup_ShowSearchBarCheckbox_OnLoad(this) Guda_SettingsPopup_ShowSearchBarCheckbox_OnLoad(this)
</OnLoad> </OnLoad>
<OnClick> <OnClick>
Guda_SettingsPopup_ShowSearchBarCheckbox_OnClick(this) Guda_SettingsPopup_ShowSearchBarCheckbox_OnClick(this)
</OnClick> </OnClick>
</Scripts> </Scripts>
</CheckButton> </CheckButton>
<!-- Show Quest Item Bar Checkbox --> <!-- Show Quest Item Bar Checkbox -->
<CheckButton name="$parent_ShowQuestBarCheckbox" inherits="OptionsCheckButtonTemplate"> <CheckButton name="Guda_SettingsPopup_ShowQuestBarCheckbox" inherits="OptionsCheckButtonTemplate">
<Anchors> <Anchors>
<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parent_ShowSearchBarCheckbox"> <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="Guda_SettingsPopup_ShowSearchBarCheckbox">
<Offset> <Offset>
<AbsDimension x="150" y="0"/> <AbsDimension x="150" y="0"/>
</Offset> </Offset>
</Anchor> </Anchor>
</Anchors> </Anchors>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
Guda_SettingsPopup_ShowQuestBarCheckbox_OnLoad(this) Guda_SettingsPopup_ShowQuestBarCheckbox_OnLoad(this)
</OnLoad> </OnLoad>
<OnClick> <OnClick>
Guda_SettingsPopup_ShowQuestBarCheckbox_OnClick(this) Guda_SettingsPopup_ShowQuestBarCheckbox_OnClick(this)
</OnClick> </OnClick>
</Scripts> </Scripts>
</CheckButton> </CheckButton>
<!-- Hover Bagline Checkbox --> <!-- Hover Bagline Checkbox -->
<CheckButton name="$parent_HoverBaglineCheckbox" inherits="OptionsCheckButtonTemplate"> <CheckButton name="Guda_SettingsPopup_HoverBaglineCheckbox" inherits="OptionsCheckButtonTemplate">
<Anchors> <Anchors>
<Anchor point="TOP" relativePoint="BOTTOM" relativeTo="$parent_ShowSearchBarCheckbox"> <Anchor point="TOP" relativePoint="BOTTOM" relativeTo="Guda_SettingsPopup_ShowSearchBarCheckbox">
<Offset> <Offset>
<AbsDimension x="0" y="-8"/> <AbsDimension x="0" y="-8"/>
</Offset> </Offset>
</Anchor> </Anchor>
</Anchors> </Anchors>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
Guda_SettingsPopup_HoverBaglineCheckbox_OnLoad(this) Guda_SettingsPopup_HoverBaglineCheckbox_OnLoad(this)
</OnLoad> </OnLoad>
<OnClick> <OnClick>
Guda_SettingsPopup_HoverBaglineCheckbox_OnClick(this) Guda_SettingsPopup_HoverBaglineCheckbox_OnClick(this)
</OnClick> </OnClick>
</Scripts> </Scripts>
</CheckButton> </CheckButton>
<!-- Hide Footer Checkbox --> <!-- Hide Footer Checkbox -->
<CheckButton name="$parent_HideFooterCheckbox" inherits="OptionsCheckButtonTemplate"> <CheckButton name="Guda_SettingsPopup_HideFooterCheckbox" inherits="OptionsCheckButtonTemplate">
<Anchors> <Anchors>
<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parent_HoverBaglineCheckbox"> <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="Guda_SettingsPopup_HoverBaglineCheckbox">
<Offset> <Offset>
<AbsDimension x="150" y="0"/> <AbsDimension x="150" y="0"/>
</Offset> </Offset>
</Anchor> </Anchor>
</Anchors> </Anchors>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
Guda_SettingsPopup_HideFooterCheckbox_OnLoad(this) Guda_SettingsPopup_HideFooterCheckbox_OnLoad(this)
</OnLoad> </OnLoad>
<OnClick> <OnClick>
Guda_SettingsPopup_HideFooterCheckbox_OnClick(this) Guda_SettingsPopup_HideFooterCheckbox_OnClick(this)
</OnClick> </OnClick>
</Scripts> </Scripts>
</CheckButton> </CheckButton>
</Frames>
</Frame>
<!-- How to Use Tab Content -->
<Frame name="$parent_HowToUseTab" setAllPoints="true" hidden="true">
<Layers>
<Layer level="ARTWORK">
<FontString name="$parent_Instructions" inherits="GameFontHighlight" justifyH="LEFT" justifyV="TOP">
<Size>
<AbsDimension x="360" y="0"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="30" y="-80"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
</Frames> </Frames>
<Scripts> <Scripts>