Only apply numeric offset when not in numeric mode

This offset is an additional offset meant to apply only when a class power counter is in a non-Numeric mode with the "also show numeric" checkbox checked. This offset is hidden when in Numeric mode, but was still being applied, therefore making it an option you could not change without going through multiple other steps first.
This commit is contained in:
Parnic
2023-01-15 12:35:14 -06:00
parent 8627ad39d5
commit d49884198d

View File

@ -391,7 +391,7 @@ function IceClassPowerCounter.prototype:GetDefaultSettings()
defaults["hideFriendly"] = false defaults["hideFriendly"] = false
defaults["pulseWhenFull"] = true defaults["pulseWhenFull"] = true
defaults["overrideAlpha"] = true defaults["overrideAlpha"] = true
defaults["numericVerticalOffset"] = 0 defaults["numericVerticalOffset"] = -25
defaults["alwaysShowNumeric"] = false defaults["alwaysShowNumeric"] = false
return defaults return defaults
@ -712,6 +712,7 @@ end
function IceClassPowerCounter.prototype:SetDisplayMode() function IceClassPowerCounter.prototype:SetDisplayMode()
if self:GetRuneMode() == "Numeric" or self.moduleSettings.alsoShowNumeric then if self:GetRuneMode() == "Numeric" or self.moduleSettings.alsoShowNumeric then
self.frame.numeric:Show() self.frame.numeric:Show()
self.frame.numeric:SetPoint("CENTER", self.frame.numericParent, "CENTER", 0, self.moduleSettings.runeMode == "Numeric" and 0 or self.moduleSettings.numericVerticalOffset)
for i=1, self.numRunes do for i=1, self.numRunes do
self.frame.graphical[i]:Hide() self.frame.graphical[i]:Hide()
end end
@ -737,7 +738,6 @@ function IceClassPowerCounter.prototype:CreateRuneFrame()
self.frame.numeric:SetJustifyH("CENTER") self.frame.numeric:SetJustifyH("CENTER")
self.frame.numeric:SetPoint("CENTER", self.frame.numericParent, "CENTER", 0, self.moduleSettings.numericVerticalOffset)
self.frame.numeric:Hide() self.frame.numeric:Hide()
if (not self.frame.graphical) then if (not self.frame.graphical) then