674e0c0 - Fix char-specific settings, add Gedren
[wowui.git] / OmaRF / Events.lua
index 4316a82..41fc221 100644 (file)
@@ -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