From b929c22d7077fbd092f8811b70b0f999c6a3f5a1 Mon Sep 17 00:00:00 2001 From: Oune Date: Sun, 22 Feb 2026 16:34:08 +0100 Subject: [PATCH 1/5] Stagger Display as Amount, Percentage or Both --- Core/Defaults.lua | 1 + Core/GUI.lua | 21 +++++++++++++++++++++ Locales/enUS.lua | 5 +++++ 3 files changed, 27 insertions(+) diff --git a/Core/Defaults.lua b/Core/Defaults.lua index 523a147..61c4ad0 100755 --- a/Core/Defaults.lua +++ b/Core/Defaults.lua @@ -472,6 +472,7 @@ local Defaults = { Layout = {"CENTER", "CENTER", 0, 0}, ShowStaggerDPS = false, }, + StaggerDisplayMode = "AMOUNT", }, CastBar = { Enabled = true, diff --git a/Core/GUI.lua b/Core/GUI.lua index 18029ff..787e4a2 100755 --- a/Core/GUI.lua +++ b/Core/GUI.lua @@ -53,6 +53,19 @@ local PowerNames = { } } +local StaggerDisplayModes = { + { + ["AMOUNT"] = LL("Amount"), + ["PERCENTAGE"] = LL("Percentage"), + ["BOTH"] = LL("Both") + }, + { + "AMOUNT", + "PERCENTAGE", + "BOTH" + } +} + local ClassToPrettyClass = { ["DEATHKNIGHT"] = "|cFFC41E31" .. LL("DEATHKNIGHT") .. "|r", ["DRUID"] = "|cFFFF7C0A" .. LL("DRUID") .. "|r", @@ -2309,6 +2322,14 @@ local function CreateSecondaryPowerBarSettings(parentContainer) colourStaggerByStateCheckbox:SetRelativeWidth(1) toggleContainer:AddChild(colourStaggerByStateCheckbox) + local staggerDropdown = AG:Create("Dropdown") + staggerDropdown:SetLabel("Stagger Display") + staggerDropdown:SetList(StaggerDisplayModes[1], StaggerDisplayModes[2], StaggerDisplayModes[3]) + staggerDropdown:SetValue(BCDM.db.profile.SecondaryPowerBar.StaggerDisplayMode) + staggerDropdown:SetCallback("OnValueChanged", function(self, _, value) BCDM.db.profile.SecondaryPowerBar.StaggerDisplayMode = value BCDM:UpdateSecondaryPowerBar() end) + staggerDropdown:SetRelativeWidth(1) + toggleContainer:AddChild(staggerDropdown) + local showStaggerDPSCheckbox = AG:Create("CheckBox") showStaggerDPSCheckbox:SetLabel(LL("Stagger Damage Per Second")) showStaggerDPSCheckbox:SetValue(BCDM.db.profile.SecondaryPowerBar.Text.ShowStaggerDPS) diff --git a/Locales/enUS.lua b/Locales/enUS.lua index 43196e5..473e1ae 100644 --- a/Locales/enUS.lua +++ b/Locales/enUS.lua @@ -71,3 +71,8 @@ L["Use Global Profile Settings"] = "Use Global Profile Settings" L["Join the Discord Community!"] = "Join the Discord Community!" L["Report Issues / Feedback on GitHub!"] = "Report Issues / Feedback on GitHub!" L["Support is truly appreciated"] = "Support is truly appreciated" + +-- [[ StaggerDisplayModes]] +L["Amount"] = "Amount" +L["Percentage"] = "Percentage" +L["Both"] = "Both" \ No newline at end of file From 0630e3d16a59fde6420f76cd7e8a0a156c7146c9 Mon Sep 17 00:00:00 2001 From: Oune Date: Sun, 22 Feb 2026 16:38:29 +0100 Subject: [PATCH 2/5] Stagger Display change --- Modules/SecondaryPowerBar.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Modules/SecondaryPowerBar.lua b/Modules/SecondaryPowerBar.lua index 9fff9d0..1ddc7bc 100755 --- a/Modules/SecondaryPowerBar.lua +++ b/Modules/SecondaryPowerBar.lua @@ -466,6 +466,11 @@ local function UpdatePowerValues() secondaryPowerBar.Status:SetStatusBarColor(GetPowerBarColor()) end local textDisplay = AbbreviateLargeNumbers(powerCurrent) + if secondaryPowerBarDB.StaggerDisplayMode == "PERCENTAGE" then + textDisplay = string.format("%s (%.1f%%)", textDisplay, staggerPercentage) + elseif secondaryPowerBarDB.StaggerDisplayMode == "BOTH" then + textDisplay = string.format("%s (%.1f%%)", textDisplay, staggerPercentage) + end if secondaryPowerBarDB.Text.ShowStaggerDPS and powerCurrent > 0 then local damagePerTick = powerCurrent / 20 textDisplay = textDisplay .. " (" .. AbbreviateLargeNumbers(damagePerTick) .. " / 0.5s)" From a9c1c6ff490ae380d19213c4a6e3420c86eb6eef Mon Sep 17 00:00:00 2001 From: Oune Date: Sun, 22 Feb 2026 17:14:28 +0100 Subject: [PATCH 3/5] Bug fixes --- Core/GUI.lua | 2 +- Modules/SecondaryPowerBar.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/GUI.lua b/Core/GUI.lua index 787e4a2..c161fd7 100755 --- a/Core/GUI.lua +++ b/Core/GUI.lua @@ -2327,7 +2327,7 @@ local function CreateSecondaryPowerBarSettings(parentContainer) staggerDropdown:SetList(StaggerDisplayModes[1], StaggerDisplayModes[2], StaggerDisplayModes[3]) staggerDropdown:SetValue(BCDM.db.profile.SecondaryPowerBar.StaggerDisplayMode) staggerDropdown:SetCallback("OnValueChanged", function(self, _, value) BCDM.db.profile.SecondaryPowerBar.StaggerDisplayMode = value BCDM:UpdateSecondaryPowerBar() end) - staggerDropdown:SetRelativeWidth(1) + staggerDropdown:SetRelativeWidth(0.5) toggleContainer:AddChild(staggerDropdown) local showStaggerDPSCheckbox = AG:Create("CheckBox") diff --git a/Modules/SecondaryPowerBar.lua b/Modules/SecondaryPowerBar.lua index 1ddc7bc..97981b1 100755 --- a/Modules/SecondaryPowerBar.lua +++ b/Modules/SecondaryPowerBar.lua @@ -467,9 +467,9 @@ local function UpdatePowerValues() end local textDisplay = AbbreviateLargeNumbers(powerCurrent) if secondaryPowerBarDB.StaggerDisplayMode == "PERCENTAGE" then - textDisplay = string.format("%s (%.1f%%)", textDisplay, staggerPercentage) + textDisplay = string.format("%.0f%%", staggerPercentage) elseif secondaryPowerBarDB.StaggerDisplayMode == "BOTH" then - textDisplay = string.format("%s (%.1f%%)", textDisplay, staggerPercentage) + textDisplay = string.format("%s (%.0f%%)", textDisplay, staggerPercentage) end if secondaryPowerBarDB.Text.ShowStaggerDPS and powerCurrent > 0 then local damagePerTick = powerCurrent / 20 From 82b5546acde47ab446d92783f002949e3cdef9bd Mon Sep 17 00:00:00 2001 From: Oune Date: Sun, 22 Feb 2026 18:12:46 +0100 Subject: [PATCH 4/5] Enhance Settings GUI --- Core/GUI.lua | 46 +++++++++++++++++++++++++++++----------------- Locales/enUS.lua | 6 ++++-- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/Core/GUI.lua b/Core/GUI.lua index c161fd7..3332672 100755 --- a/Core/GUI.lua +++ b/Core/GUI.lua @@ -2246,6 +2246,29 @@ local function CreateSecondaryPowerBarTextSettings(parentContainer) fontSizeSlider:SetRelativeWidth(0.33) textContainer:AddChild(fontSizeSlider) + if isUnitMonk then + local staggerContainer = AG:Create("InlineGroup") + staggerContainer:SetTitle(LL("Stagger Settings")) + staggerContainer:SetFullWidth(true) + staggerContainer:SetLayout("Flow") + textContainer:AddChild(staggerContainer) + + local staggerDropdown = AG:Create("Dropdown") + staggerDropdown:SetLabel(LL("Displayed As")) + staggerDropdown:SetList(StaggerDisplayModes[1], StaggerDisplayModes[2], StaggerDisplayModes[3]) + staggerDropdown:SetValue(BCDM.db.profile.SecondaryPowerBar.StaggerDisplayMode) + staggerDropdown:SetCallback("OnValueChanged", function(self, _, value) BCDM.db.profile.SecondaryPowerBar.StaggerDisplayMode = value BCDM:UpdateSecondaryPowerBar() end) + staggerDropdown:SetRelativeWidth(0.5) + staggerContainer:AddChild(staggerDropdown) + + local showStaggerDPSCheckbox = AG:Create("CheckBox") + showStaggerDPSCheckbox:SetLabel(LL("Show Stagger Damage Per Second")) + showStaggerDPSCheckbox:SetValue(BCDM.db.profile.SecondaryPowerBar.Text.ShowStaggerDPS) + showStaggerDPSCheckbox:SetCallback("OnValueChanged", function(self, _, value) BCDM.db.profile.SecondaryPowerBar.Text.ShowStaggerDPS = value BCDM:UpdateSecondaryPowerBar() RefreshSecondaryPowerBarGUISettings() end) + showStaggerDPSCheckbox:SetRelativeWidth(0.5) + staggerContainer:AddChild(showStaggerDPSCheckbox) + end + function RefreshSecondaryPowerBarTextGUISettings() local enabled = BCDM.db.profile.SecondaryPowerBar.Text.Enabled anchorFromDropdown:SetDisabled(not enabled) @@ -2253,6 +2276,12 @@ local function CreateSecondaryPowerBarTextSettings(parentContainer) xOffsetSlider:SetDisabled(not enabled) yOffsetSlider:SetDisabled(not enabled) fontSizeSlider:SetDisabled(not enabled) + if staggerDropdown then + staggerDropdown:SetDisabled(not enabled) + end + if showStaggerDPSCheckbox then + showStaggerDPSCheckbox:SetDisabled(not enabled) + end end RefreshSecondaryPowerBarTextGUISettings() @@ -2267,8 +2296,6 @@ local function CreateSecondaryPowerBarSettings(parentContainer) ScrollFrame:SetFullHeight(true) parentContainer:AddChild(ScrollFrame) - local isUnitMonkorDeathKnight = isUnitDeathKnight or isUnitMonk - local toggleContainer = AG:Create("InlineGroup") toggleContainer:SetTitle(LL("Toggles & Colours")) toggleContainer:SetFullWidth(true) @@ -2321,21 +2348,6 @@ local function CreateSecondaryPowerBarSettings(parentContainer) colourStaggerByStateCheckbox:SetCallback("OnValueChanged", function(self, _, value) BCDM.db.profile.SecondaryPowerBar.ColourByState = value BCDM:UpdateSecondaryPowerBar() RefreshSecondaryPowerBarGUISettings() end) colourStaggerByStateCheckbox:SetRelativeWidth(1) toggleContainer:AddChild(colourStaggerByStateCheckbox) - - local staggerDropdown = AG:Create("Dropdown") - staggerDropdown:SetLabel("Stagger Display") - staggerDropdown:SetList(StaggerDisplayModes[1], StaggerDisplayModes[2], StaggerDisplayModes[3]) - staggerDropdown:SetValue(BCDM.db.profile.SecondaryPowerBar.StaggerDisplayMode) - staggerDropdown:SetCallback("OnValueChanged", function(self, _, value) BCDM.db.profile.SecondaryPowerBar.StaggerDisplayMode = value BCDM:UpdateSecondaryPowerBar() end) - staggerDropdown:SetRelativeWidth(0.5) - toggleContainer:AddChild(staggerDropdown) - - local showStaggerDPSCheckbox = AG:Create("CheckBox") - showStaggerDPSCheckbox:SetLabel(LL("Stagger Damage Per Second")) - showStaggerDPSCheckbox:SetValue(BCDM.db.profile.SecondaryPowerBar.Text.ShowStaggerDPS) - showStaggerDPSCheckbox:SetCallback("OnValueChanged", function(self, _, value) BCDM.db.profile.SecondaryPowerBar.Text.ShowStaggerDPS = value BCDM:UpdateSecondaryPowerBar() RefreshSecondaryPowerBarGUISettings() end) - showStaggerDPSCheckbox:SetRelativeWidth(1) - toggleContainer:AddChild(showStaggerDPSCheckbox) end local matchAnchorWidthCheckbox = AG:Create("CheckBox") diff --git a/Locales/enUS.lua b/Locales/enUS.lua index 473e1ae..8020cfc 100644 --- a/Locales/enUS.lua +++ b/Locales/enUS.lua @@ -72,7 +72,9 @@ L["Join the Discord Community!"] = "Join the Discord Community!" L["Report Issues / Feedback on GitHub!"] = "Report Issues / Feedback on GitHub!" L["Support is truly appreciated"] = "Support is truly appreciated" --- [[ StaggerDisplayModes]] +-- [[ Stagger Settings ]] L["Amount"] = "Amount" L["Percentage"] = "Percentage" -L["Both"] = "Both" \ No newline at end of file +L["Both"] = "Both" +L["Displayed As"] = "Stagger Display As" +L["Stagger Damage Per Second"] = "Stagger Damage Per Second" \ No newline at end of file From 36691417778f99747a5954fb0d86e8958997ebe1 Mon Sep 17 00:00:00 2001 From: Oune Date: Wed, 15 Apr 2026 16:05:57 +0200 Subject: [PATCH 5/5] Fix disable Secondary Power Bar Text for Stagger --- Core/GUI.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Core/GUI.lua b/Core/GUI.lua index 833af6e..a746dd0 100755 --- a/Core/GUI.lua +++ b/Core/GUI.lua @@ -2541,14 +2541,15 @@ local function CreateSecondaryPowerBarTextSettings(parentContainer) fontSizeSlider:SetRelativeWidth(0.33) textContainer:AddChild(fontSizeSlider) + local staggerContainer, staggerDropdown, showStaggerDPSCheckbox if isUnitMonk then - local staggerContainer = AG:Create("InlineGroup") + staggerContainer = AG:Create("InlineGroup") staggerContainer:SetTitle(LL("Stagger Settings")) staggerContainer:SetFullWidth(true) staggerContainer:SetLayout("Flow") textContainer:AddChild(staggerContainer) - local staggerDropdown = AG:Create("Dropdown") + staggerDropdown = AG:Create("Dropdown") staggerDropdown:SetLabel(LL("Displayed As")) staggerDropdown:SetList(StaggerDisplayModes[1], StaggerDisplayModes[2], StaggerDisplayModes[3]) staggerDropdown:SetValue(BCDM.db.profile.SecondaryPowerBar.StaggerDisplayMode) @@ -2556,7 +2557,7 @@ local function CreateSecondaryPowerBarTextSettings(parentContainer) staggerDropdown:SetRelativeWidth(0.5) staggerContainer:AddChild(staggerDropdown) - local showStaggerDPSCheckbox = AG:Create("CheckBox") + showStaggerDPSCheckbox = AG:Create("CheckBox") showStaggerDPSCheckbox:SetLabel(LL("Show Stagger Damage Per Second")) showStaggerDPSCheckbox:SetValue(BCDM.db.profile.SecondaryPowerBar.Text.ShowStaggerDPS) showStaggerDPSCheckbox:SetCallback("OnValueChanged", function(self, _, value) BCDM.db.profile.SecondaryPowerBar.Text.ShowStaggerDPS = value BCDM:UpdateSecondaryPowerBar() RefreshSecondaryPowerBarGUISettings() end)