diff --git a/Core/EventHandlers.lua b/Core/EventHandlers.lua index d2f3f6fa..1f726e1e 100644 --- a/Core/EventHandlers.lua +++ b/Core/EventHandlers.lua @@ -676,6 +676,8 @@ function R:OnChatCommand(input) self:Print("Current map: " .. mapID .. " ~ " .. mapName) elseif strlower(input) == "purge" then -- TODO: This should be done automatically, no? self.Database:PurgeObsoleteEntries() + elseif strlower(input) == "progress" then + self.GUI:ToggleProgressBar() elseif strlower(input) == "test" then self.Testing:RunIntegrationTests() elseif strlower(input) == "profiling" then diff --git a/Core/GUI/AnchoredTrackingBar.lua b/Core/GUI/AnchoredTrackingBar.lua index 6aa5d363..d97ad7e4 100644 --- a/Core/GUI/AnchoredTrackingBar.lua +++ b/Core/GUI/AnchoredTrackingBar.lua @@ -91,3 +91,9 @@ function GUI:UpdateBar() self.barGroup:Lock() end end + +function GUI:ToggleProgressBar() + Rarity.db.profile.bar.visible = not Rarity.db.profile.bar.visible + Rarity.GUI:UpdateBar() + Rarity.GUI:UpdateText() +end diff --git a/Core/GUI/DataBrokerDisplay.lua b/Core/GUI/DataBrokerDisplay.lua index d1f49283..b978b4c1 100644 --- a/Core/GUI/DataBrokerDisplay.lua +++ b/Core/GUI/DataBrokerDisplay.lua @@ -72,10 +72,7 @@ function dataobj:OnClick(button) (self.db.profile.tooltipActivation == CONSTANTS.TOOLTIP.ACTIVATION_METHOD_CLICK and isRightButton) or (self.db.profile.tooltipActivation == CONSTANTS.TOOLTIP.ACTIVATION_METHOD_HOVER and isLeftButton) then - -- Toggle progress bar visibility - R.db.profile.bar.visible = not R.db.profile.bar.visible - Rarity.GUI:UpdateBar() - Rarity.GUI:UpdateText() + Rarity.GUI:ToggleProgressBar() elseif self.db.profile.tooltipActivation == CONSTANTS.TOOLTIP.ACTIVATION_METHOD_CLICK and isLeftButton then if Rarity.Tooltips:IsTooltipAcquired("RarityTooltip") then Rarity:HideTooltip()