X-Git-Url: https://www.aleksib.fi/git/wowui.git/blobdiff_plain/d180f82975c6b13a3380bd8df5ab47df70112c49..674e0c047004a7f514ee4c991e09603bcee96432:/OmaRF/Events.lua?ds=sidebyside diff --git a/OmaRF/Events.lua b/OmaRF/Events.lua index 4316a82..41fc221 100644 --- a/OmaRF/Events.lua +++ b/OmaRF/Events.lua @@ -19,12 +19,12 @@ local RAID_CLASS_COLORS = RAID_CLASS_COLORS; local checkIndicators = OmaRFIndicators.CheckIndicators; local Settings = OmaRFSettings; -local width = Settings.Character.Width; local baseColor = Settings.BaseColor; local overlayColorDispel = Settings.OverlayColorDispel; local overlayColorCharm = Settings.OverlayColorCharm; local overlayColorAlert = Settings.OverlayColorAlert; local powerColors = Settings.PowerColors; +local width = 10; local M = {}; OmaRFEvents = M; @@ -80,8 +80,10 @@ local function updateText(frame, unit) local healthLost = max - current; if UnitIsDeadOrGhost(unit) then frame.text:SetText("Dead"); + frame.text:Show(); elseif not UnitIsConnected(unit) then frame.text:SetText("DC"); + frame.text:Show(); elseif healthLost > 0 then if healthLost > 1200000000 then -- 1.2B frame.text:SetFormattedText("-%.1fB", healthLost / 1000000000); @@ -337,3 +339,7 @@ eventFuncs["GROUP_ROSTER_UPDATE"] = eventFuncs["UPDATE_ALL_BARS"]; function M.UnitEvent(self, event) eventFuncs[event](self); end + +function M.LoadChar() + width = Settings.Character.Width; +end