From 730c27128ebd198538f31a32d98c7f04bf9dc061 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Fri, 16 Sep 2016 18:53:45 +0300 Subject: [PATCH] Short format on regen dt now also shorens the value (cause fuck those 7 digit values) --- ElvUI_SLE/modules/sledatatexts/regen.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ElvUI_SLE/modules/sledatatexts/regen.lua b/ElvUI_SLE/modules/sledatatexts/regen.lua index 87f803b..0c03627 100644 --- a/ElvUI_SLE/modules/sledatatexts/regen.lua +++ b/ElvUI_SLE/modules/sledatatexts/regen.lua @@ -2,15 +2,16 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local DT = E:GetModule('DataTexts') local MANA_REGEN = MANA_REGEN local displayNumberString = '' +local displayNumberStringShort = '' local lastPanel; local GetManaRegen = GetManaRegen local function OnEvent(self, event, unit) local baseMR, castingMR = GetManaRegen() if T.InCombatLockdown() then - self.text:SetFormattedText(displayNumberString, E.db.sle.dt.regen.short and "Mp5" or MANA_REGEN, castingMR*5) + self.text:SetFormattedText(E.db.sle.dt.regen.short and displayNumberStringShort or displayNumberString, E.db.sle.dt.regen.short and "Mp5" or MANA_REGEN, E.db.sle.dt.regen.short and E:ShortValue(castingMR*5) or castingMR*5) else - self.text:SetFormattedText(displayNumberString, E.db.sle.dt.regen.short and "Mp5" or MANA_REGEN, baseMR*5) + self.text:SetFormattedText(E.db.sle.dt.regen.short and displayNumberStringShort or displayNumberString, E.db.sle.dt.regen.short and "Mp5" or MANA_REGEN, E.db.sle.dt.regen.short and E:ShortValue(baseMR*5) or baseMR*5) end lastPanel = self @@ -18,6 +19,7 @@ end local function ValueColorUpdate(hex, r, g, b) displayNumberString = T.join("", "%s: ", hex, "%.2f|r") + displayNumberStringShort = T.join("", "%s: ", hex, "%s|r") if lastPanel ~= nil then OnEvent(lastPanel) -- 1.7.9.5