feat: track items for grinding

This commit is contained in:
Salikh Gurgenidze
2025-12-23 03:56:36 +04:00
parent 7d8f0452e4
commit bd8ac3e4b0
9 changed files with 349 additions and 0 deletions
+34
View File
@@ -65,6 +65,10 @@ function Guda_SettingsPopup_OnShow(self)
if hoverBagline == nil then
hoverBagline = false
end
local showTrackedItems = Guda.Modules.DB:GetSetting("showTrackedItems")
if showTrackedItems == nil then
showTrackedItems = false
end
local bgTransparency = Guda.Modules.DB:GetSetting("bgTransparency") or 0.15
-- Update sliders and checkboxes
@@ -81,6 +85,7 @@ function Guda_SettingsPopup_OnShow(self)
local showSearchBarCheckbox = getglobal("Guda_SettingsPopup_ShowSearchBarCheckbox")
local showQuestBarCheckbox = getglobal("Guda_SettingsPopup_ShowQuestBarCheckbox")
local hoverBaglineCheckbox = getglobal("Guda_SettingsPopup_HoverBaglineCheckbox")
local showTrackedItemsCheckbox = getglobal("Guda_SettingsPopup_ShowTrackedItemsCheckbox")
if bagSlider then
bagSlider:SetValue(bagColumns)
@@ -134,6 +139,10 @@ function Guda_SettingsPopup_OnShow(self)
hoverBaglineCheckbox:SetChecked(hoverBagline and 1 or 0)
end
if showTrackedItemsCheckbox then
showTrackedItemsCheckbox:SetChecked(showTrackedItems and 1 or 0)
end
-- Update display (might be too tall for current frame size)
local frame = getglobal("Guda_SettingsPopup")
if frame then
@@ -809,3 +818,28 @@ end
function SettingsPopup:Initialize()
Guda:Debug("Settings popup initialized")
end
-- Show Tracked Items Checkbox OnLoad
function Guda_SettingsPopup_ShowTrackedItemsCheckbox_OnLoad(self)
getglobal(self:GetName().."Text"):SetText("Track items")
local currentValue = Guda.Modules.DB:GetSetting("showTrackedItems")
if currentValue == nil then
currentValue = false
end
self:SetChecked(currentValue and 1 or 0)
end
-- Show Tracked Items Checkbox OnClick
function Guda_SettingsPopup_ShowTrackedItemsCheckbox_OnClick(self)
local isChecked = self:GetChecked()
Guda.Modules.DB:SetSetting("showTrackedItems", isChecked == 1)
if Guda.Modules.TrackedItemBar and Guda.Modules.TrackedItemBar.Update then
Guda.Modules.TrackedItemBar:Update()
end
-- Refresh bag frame to show/hide checkmarks
if Guda.Modules.BagFrame and Guda.Modules.BagFrame.Update then
Guda.Modules.BagFrame:Update()
end
end