Skip to content

Commit

Permalink
3.2.5
Browse files Browse the repository at this point in the history
Added option to disable the totals row
  • Loading branch information
Noshei committed Jan 14, 2025
1 parent 06c6042 commit 2c6cb61
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 13 deletions.
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"utf8": "disable"
},
"Lua.workspace.library": [
"~\\.vscode\\extensions\\ketho.wow-api-0.18.1\\Annotations"
"~\\.vscode\\extensions\\ketho.wow-api-0.18.2\\Annotations"
],
"Lua.diagnostics.globals": [
"RECrystallize_PriceCheckItemID",
Expand Down Expand Up @@ -93,7 +93,8 @@
"ADD",
"LowHealthFrame",
"GameTooltip_SetTitle",
"GameTooltip_AddNormalLine"
"GameTooltip_AddNormalLine",
"AddonCompartmentFrame"
],
"Lua.diagnostics.disable": [
"assign-type-mismatch",
Expand Down
62 changes: 57 additions & 5 deletions Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ GT.defaults = {
sessionOnly = false,
itemTooltip = false,
alertsEnable = false,
totalsRow = true,
},
Alerts = {
},
Expand Down Expand Up @@ -136,9 +137,11 @@ local generalOptions = {
type = "toggle",
dialogControl = "NW_CheckBox",
name = "Filters Button",
desc = "Left Click shows filters menu.\n" ..
"Right Click clears all filters.\n" ..
"Shift + Left Click resets Session Data.",
desc = "If Enabled a button will be shown on screen that can be used to quickly change filters.\n" ..
"|cff8080ffLeft Click|r shows filters menu.\n" ..
"|cff8080ffRight Click|r clears all filters.\n" ..
"|cff8080ffShift + Left Click|r resets Session Data.\n" ..
"|cff8080ffShift + Right-Click|r to reset Alert Triggers",
width = 1.70,
get = function() return GT.db.profile.General.filtersButton end,
set = function(_, key)
Expand Down Expand Up @@ -348,6 +351,13 @@ local generalOptions = {
GT.db.profile.General.collapseDisplay = key
GT:CollapseManager(key)
end,
disabled = function()
if GT.db.profile.General.totalsRow then
return false
else
return true
end
end,
order = 210
},
collapseTime = {
Expand Down Expand Up @@ -375,6 +385,27 @@ local generalOptions = {
name = "Other",
order = 300
},
totalsRow = {
type = "toggle",
dialogControl = "NW_CheckBox",
name = "Display Totals Row",
desc = "If selected the totals row will be displayed.\n\n" ..
"|cffff0000When disabled the following options will also be disabled:|r\n" ..
" - Collapse Delay\n" ..
" - Totals Color/Size/Font\n" ..
" - Total Items Alerts",
width = 1.70,
get = function() return GT.db.profile.General.totalsRow end,
set = function(_, key)
GT.db.profile.General.totalsRow = key
if not key then
GT.db.profile.General.collapseDisplay = key
GT:CollapseManager(key)
end
GT:RebuildDisplay("Display Totals Row Changed")
end,
order = 320
},
allFiltered = {
type = "toggle",
dialogControl = "NW_CheckBox",
Expand All @@ -396,7 +427,7 @@ local generalOptions = {
return false
end
end,
order = 320
order = 321
},
itemTooltip = {
type = "toggle",
Expand All @@ -411,7 +442,7 @@ local generalOptions = {
GT.db.profile.General.itemTooltip = key
GT:RebuildDisplay("Item Tooltip Option Changed")
end,
order = 321
order = 322
},
},
},
Expand Down Expand Up @@ -886,6 +917,13 @@ local generalOptions = {
end
end
end,
disabled = function()
if GT.db.profile.General.totalsRow then
return false
else
return true
end
end,
order = 504
},
totalSize = {
Expand Down Expand Up @@ -919,6 +957,13 @@ local generalOptions = {
end
GT:AllignColumns()
end,
disabled = function()
if GT.db.profile.General.totalsRow then
return false
else
return true
end
end,
order = 505
},
totalFont = {
Expand All @@ -945,6 +990,13 @@ local generalOptions = {
end
GT:AllignColumns()
end,
disabled = function()
if GT.db.profile.General.totalsRow then
return false
else
return true
end
end,
order = 506
},
},
Expand Down
4 changes: 4 additions & 0 deletions GatheringTracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,10 @@ end

function GT:SetupTotalsRow()
GT.Debug("SetupTotalsRow", 1)
if not GT.db.profile.General.totalsRow then
return
end

local playerTotals = {}
local priceTotal = 0
local itemsPerHour = nil
Expand Down
16 changes: 10 additions & 6 deletions GatheringTracker.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Title: Gathering Tracker
## Notes: Addon for tracking gathered items, supports solo players and groups
## Author: Noshei
## Version: 3.2.4
## Version: 3.2.5
## OptionalDeps: TradeSkillMaster, RECrystallize, Auctionator
## SavedVariables: GatheringTrackerDB
## AddonCompartmentFunc: GatheringTracker_OnAddonCompartmentClick
Expand All @@ -14,12 +14,16 @@ embeds.xml
templates.xml
GatheringTracker.lua
DisplayCreation.lua
DisplayCollapse.lua
Utilities.lua
FilterButton.lua
Alerts.lua
AlertsMenu.lua

Modules\DisplayCollapse.lua
Modules\FilterButton.lua
Modules\Alerts.lua
Modules\AlertsMenu.lua

Constants.lua
Config.lua
Broker.lua

Modules\Broker.lua

Bindings.lua
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 2c6cb61

Please sign in to comment.