Skip to content

Commit

Permalink
2.5.1
Browse files Browse the repository at this point in the history
Fix poor spelling
  • Loading branch information
Noshei committed Sep 24, 2024
1 parent 557f9a3 commit 8a4890d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 32 deletions.
30 changes: 15 additions & 15 deletions Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ GT.defaults = {
instanceHide = false,
itemsPerHour = false,
goldPerHour = false,
colpaseDisplay = false,
colpaseTime = 2,
collapseDisplay = false,
collapseTime = 2,
},
Notifications = {
Count = {
Expand Down Expand Up @@ -318,33 +318,33 @@ local generalOptions = {
},
header2 = {
type = "header",
name = "Colpase Display",
name = "Collapse Display",
order = 200
},
colpaseDisplay = {
collapseDisplay = {
type = "toggle",
name = "Colpase Display",
desc = "When selected the display will be colpased to only display the total rows.",
name = "Collapse Display",
desc = "When selected the display will be collapsed to only display the total rows.",
width = 1.70,
get = function() return GT.db.profile.General.colpaseDisplay end,
get = function() return GT.db.profile.General.collapseDisplay end,
set = function(_, key)
GT.db.profile.General.colpaseDisplay = key
GT:ColpaseManager(key)
GT.db.profile.General.collapseDisplay = key
GT:CollapseManager(key)
end,
order = 210
},
colpaseTime = {
collapseTime = {
type = "range",
name = "Colpase Delay",
name = "Collapse Delay",
desc = "This configures how long after the mouse leaves the display area before it clopases to the total rows.\nDefault is 2.",
min = 0,
max = 10,
step = 0.5,
width = 1.40,
get = function() return GT.db.profile.General.colpaseTime or 2 end,
set = function(_, key) GT.db.profile.General.colpaseTime = key end,
get = function() return GT.db.profile.General.collapseTime or 2 end,
set = function(_, key) GT.db.profile.General.collapseTime = key end,
disabled = function()
if GT.db.profile.General.colpaseDisplay then
if GT.db.profile.General.collapseDisplay then
return false
else
return true
Expand Down Expand Up @@ -553,7 +553,7 @@ local generalOptions = {
get = function() return GT.db.profile.General.numRows or 1 end,
set = function(_, key)
GT.db.profile.General.numRows = key
if not GT.db.profile.General.colpaseDisplay then
if not GT.db.profile.General.collapseDisplay then
GT:AllignRows()
end
end,
Expand Down
1 change: 1 addition & 0 deletions Constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,7 @@ local ItemData = {
Other = {
{ id = 1, name = "Current Gold", order = 1, icon = 370211, desc = "Displays the current Gold on the character, rounded to the nearest whole number." },
{ id = 2, name = "Open Bag Space", order = 2, icon = 975745, desc = "Displays the number of open bag space." },
{ id = 3, name = "Timer", order = 3, icon = 134377, desc = "Displays a timer starting from the first gather after being enabled." },
},
},
}
Expand Down
24 changes: 12 additions & 12 deletions DisplayColpase.lua → DisplayCollapse.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local GT = LibStub("AceAddon-3.0"):GetAddon("GatheringTracker")

function GT:ColpaseDisplay()
GT.Debug("ColpaseDisplay", 1)
function GT:CollapseDisplay()
GT.Debug("CollapseDisplay", 1)
for itemID, itemFrame in pairs(GT.Display.Frames) do
if itemID < 9999999998 then
itemFrame:Hide()
Expand All @@ -22,21 +22,21 @@ function GT:ExpandDisplay()
GT:AllignRows()
end

function GT:ColpaseManager(wait)
GT.Debug("ColpaseManager", 1, wait, GT.db.profile.General.colpaseDisplay, GT.db.profile.General.colpaseTime)
function GT:CollapseManager(wait)
GT.Debug("CollapseManager", 1, wait, GT.db.profile.General.collapseDisplay, GT.db.profile.General.collapseTime)
if wait then
GT:wait(GT.db.profile.General.colpaseTime, "ColpaseManager", false)
GT:wait(GT.db.profile.General.collapseTime, "CollapseManager", false)
return
end

if GT.db.profile.General.colpaseDisplay then
GT:ColpaseDisplay()
if GT.db.profile.General.collapseDisplay then
GT:CollapseDisplay()
if GT.Display.Frames[9999999998] then
GT.Display.Frames[9999999998]:SetScript("OnEnter", function(self, motion)
if motion then
GT:ExpandDisplay()
GT.baseFrame.frame:SetScript("OnLeave", function(self, motion)
GT:wait(GT.db.profile.General.colpaseTime, "ColpaseManager", false)
GT:wait(GT.db.profile.General.collapseTime, "CollapseManager", false)
GT.baseFrame.frame:SetScript("OnLeave", nil)
GT.baseFrame.frame:SetMouseClickEnabled(false)
end)
Expand All @@ -48,14 +48,14 @@ function GT:ColpaseManager(wait)
GT:AllignRows()
GT:AllignColumns()
GT:UpdateBaseFrameSize()
GT:ColpaseManager(false)
GT:CollapseManager(false)
end
if GT.Display.Frames[9999999999] then
GT.Display.Frames[9999999999]:SetScript("OnEnter", function(self, motion)
if motion then
GT:ExpandDisplay()
GT.baseFrame.frame:SetScript("OnLeave", function(self, motion)
GT:wait(GT.db.profile.General.colpaseTime, "ColpaseManager", false)
GT:wait(GT.db.profile.General.collapseTime, "CollapseManager", false)
GT.baseFrame.frame:SetScript("OnLeave", nil)
GT.baseFrame.frame:SetMouseClickEnabled(false)
end)
Expand All @@ -65,14 +65,14 @@ function GT:ColpaseManager(wait)
end
else
GT:ExpandDisplay()
GT:wait(nil, "ColpaseManager")
GT:wait(nil, "CollapseManager")

GT.baseFrame.frame:SetScript("OnLeave", nil)

GT:ClearMouse()

if #GT.Display.Order == 1 then
GT:PrepareDataForDisplay("ColpaseManager", false)
GT:PrepareDataForDisplay("CollapseManager", false)
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions GatheringTracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,8 @@ function GT:PrepareDataForDisplay(event, wait)
GT:AllignRows()
GT:AllignColumns()
GT:UpdateBaseFrameSize()
if GT.db.profile.General.colpaseDisplay then
GT:ColpaseManager(false)
if GT.db.profile.General.collapseDisplay then
GT:CollapseManager(false)
end
end

Expand Down Expand Up @@ -651,7 +651,7 @@ function GT:SetupTotalsRow()
priceTotal = priceTotal + playerPrice
end
totalItemCount = GT:SumTable(playerTotals)
if totalItemCount > 0 or GT.db.profile.General.colpaseDisplay then
if totalItemCount > 0 or GT.db.profile.General.collapseDisplay then
local itemsPerHour, goldPerHour = GT:CalculateItemsPerHourTotal(totalItemCount)

GT:InitiateFrameProcess(
Expand Down
4 changes: 2 additions & 2 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: 2.5.0
## Version: 2.5.1
## OptionalDeps: TradeSkillMaster
## SavedVariables: GatheringTrackerDB
## AddonCompartmentFunc: GatheringTracker_OnAddonCompartmentClick
Expand All @@ -11,7 +11,7 @@
embeds.xml
GatheringTracker.lua
DisplayCreation.lua
DisplayColpase.lua
DisplayCollapse.lua
Utilities.lua
FilterButton.lua
NotificationHandler.lua
Expand Down

0 comments on commit 8a4890d

Please sign in to comment.