d093a7f - Remove heal prediction from regular unit frames
[wowui.git] / OmaUF / TargetFrame.lua
index 44316c0..9192038 100644 (file)
@@ -2,8 +2,8 @@
 local _;
 local unpack, pairs = unpack, pairs;
 local format = string.format;
 local _;
 local unpack, pairs = unpack, pairs;
 local format = string.format;
-local GameTooltip = nil;
-local GameTooltip_SetDefaultAnchor = nil;
+local GameTooltip = GameTooltip;
+local GameTooltip_SetDefaultAnchor = GameTooltip_SetDefaultAnchor;
 
 local registerUnitEvents = OmaUFEvents.RegisterUnitEvents;
 local registerCastEvents = OmaUFCastBar.RegisterCastEvents;
 
 local registerUnitEvents = OmaUFEvents.RegisterUnitEvents;
 local registerCastEvents = OmaUFCastBar.RegisterCastEvents;
@@ -17,7 +17,6 @@ local bgColor = Settings.BgColor;
 local healthColor = Settings.HealthColor;
 local shieldColor = Settings.ShieldColor;
 local shieldhlColor = Settings.ShieldhlColor;
 local healthColor = Settings.HealthColor;
 local shieldColor = Settings.ShieldColor;
 local shieldhlColor = Settings.ShieldhlColor;
-local healpredColor = Settings.HealpredColor;
 local healabsorbColor = Settings.HealabsorbColor;
 local width, height = Settings.Target.Width, Settings.Target.Height;
 local anchorX, anchorY = Settings.Target.AnchorX, Settings.Target.AnchorY;
 local healabsorbColor = Settings.HealabsorbColor;
 local width, height = Settings.Target.Width, Settings.Target.Height;
 local anchorX, anchorY = Settings.Target.AnchorX, Settings.Target.AnchorY;
@@ -52,9 +51,12 @@ local function hideTooltip(secure)
     GameTooltip:FadeOut();
 end
 
     GameTooltip:FadeOut();
 end
 
-function OmaUnitFrames.InitializeTarget(parent)
+function OmaUnitFrames.UpdateTargetTooltips()
     GameTooltip = _G["GameTooltip"];
     GameTooltip_SetDefaultAnchor = _G["GameTooltip_SetDefaultAnchor"];
     GameTooltip = _G["GameTooltip"];
     GameTooltip_SetDefaultAnchor = _G["GameTooltip_SetDefaultAnchor"];
+end
+
+function OmaUnitFrames.InitializeTarget(parent)
     attributes = Settings.Character.Clickheal;
 
     local secure = CreateFrame("Button", "OmaTargetSecure", parent, inheritedFrames);
     attributes = Settings.Character.Clickheal;
 
     local secure = CreateFrame("Button", "OmaTargetSecure", parent, inheritedFrames);
@@ -113,11 +115,6 @@ function OmaUnitFrames.InitializeTarget(parent)
     frame.shieldhl:SetPoint("BOTTOMRIGHT", frame.healthback, "BOTTOMRIGHT", 1, 0);
     frame.shieldhl:SetColorTexture(unpack(shieldhlColor));
     frame.shieldhl:Hide();
     frame.shieldhl:SetPoint("BOTTOMRIGHT", frame.healthback, "BOTTOMRIGHT", 1, 0);
     frame.shieldhl:SetColorTexture(unpack(shieldhlColor));
     frame.shieldhl:Hide();
-    frame.healpred = frame:CreateTexture(nil, "ARTWORK");
-    frame.healpred:SetPoint("TOPLEFT", frame.health, "TOPRIGHT");
-    frame.healpred:SetPoint("BOTTOMLEFT", frame.health, "BOTTOMRIGHT");
-    frame.healpred:SetColorTexture(unpack(healpredColor));
-    frame.healpred:Hide();
     frame.healabsorb = frame:CreateTexture(nil, "ARTWORK");
     frame.healabsorb:SetPoint("TOPRIGHT", frame.health, "TOPRIGHT");
     frame.healabsorb:SetPoint("BOTTOMRIGHT", frame.health, "BOTTOMRIGHT");
     frame.healabsorb = frame:CreateTexture(nil, "ARTWORK");
     frame.healabsorb:SetPoint("TOPRIGHT", frame.health, "TOPRIGHT");
     frame.healabsorb:SetPoint("BOTTOMRIGHT", frame.health, "BOTTOMRIGHT");
@@ -139,7 +136,7 @@ function OmaUnitFrames.InitializeTarget(parent)
     frame.leader:Hide();
     frame.name = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlightLarge");
     frame.name:SetPoint("LEFT", frame.healthback, "LEFT", 2, 1);
     frame.leader:Hide();
     frame.name = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlightLarge");
     frame.name:SetPoint("LEFT", frame.healthback, "LEFT", 2, 1);
-    frame.name.count = 9;
+    frame.name.count = 8;
     frame.level = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight");
     frame.level:SetPoint("LEFT", frame.manaback, "LEFT", 2, 1);
     frame.targeticon = frame:CreateTexture(nil, "OVERLAY");
     frame.level = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight");
     frame.level:SetPoint("LEFT", frame.manaback, "LEFT", 2, 1);
     frame.targeticon = frame:CreateTexture(nil, "OVERLAY");