From 8a4890d2617e3bd2d194bc62f0d82f026943d151 Mon Sep 17 00:00:00 2001 From: Noshei <8866000+Noshei@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:51:38 -0600 Subject: [PATCH] 2.5.1 Fix poor spelling --- Config.lua | 30 +++++++++++------------ Constants.lua | 1 + DisplayColpase.lua => DisplayCollapse.lua | 24 +++++++++--------- GatheringTracker.lua | 6 ++--- GatheringTracker.toc | 4 +-- 5 files changed, 33 insertions(+), 32 deletions(-) rename DisplayColpase.lua => DisplayCollapse.lua (78%) diff --git a/Config.lua b/Config.lua index 8dea4e0..d475054 100644 --- a/Config.lua +++ b/Config.lua @@ -42,8 +42,8 @@ GT.defaults = { instanceHide = false, itemsPerHour = false, goldPerHour = false, - colpaseDisplay = false, - colpaseTime = 2, + collapseDisplay = false, + collapseTime = 2, }, Notifications = { Count = { @@ -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 @@ -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, diff --git a/Constants.lua b/Constants.lua index f6dc4dd..9fc3857 100644 --- a/Constants.lua +++ b/Constants.lua @@ -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." }, }, }, } diff --git a/DisplayColpase.lua b/DisplayCollapse.lua similarity index 78% rename from DisplayColpase.lua rename to DisplayCollapse.lua index bf6ca71..3b97a8c 100644 --- a/DisplayColpase.lua +++ b/DisplayCollapse.lua @@ -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() @@ -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) @@ -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) @@ -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 diff --git a/GatheringTracker.lua b/GatheringTracker.lua index 3d94a46..3c237fb 100644 --- a/GatheringTracker.lua +++ b/GatheringTracker.lua @@ -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 @@ -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( diff --git a/GatheringTracker.toc b/GatheringTracker.toc index 2511411..ea8fb4e 100644 --- a/GatheringTracker.toc +++ b/GatheringTracker.toc @@ -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 @@ -11,7 +11,7 @@ embeds.xml GatheringTracker.lua DisplayCreation.lua -DisplayColpase.lua +DisplayCollapse.lua Utilities.lua FilterButton.lua NotificationHandler.lua