git
/
wowui.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
c711b1a - Add action bar addon, just exp bar for now
[wowui.git]
/
OmaUF
/
UnitFrames.lua
diff --git
a/OmaUF/UnitFrames.lua
b/OmaUF/UnitFrames.lua
index
76c2c7e
..
815fa17
100644
(file)
--- a/
OmaUF/UnitFrames.lua
+++ b/
OmaUF/UnitFrames.lua
@@
-21,8
+21,8
@@
local shieldColor = Settings.ShieldColor;
local shieldhlColor = Settings.ShieldhlColor;
local healpredColor = Settings.HealpredColor;
local healabsorbColor = Settings.HealabsorbColor;
local shieldhlColor = Settings.ShieldhlColor;
local healpredColor = Settings.HealpredColor;
local healabsorbColor = Settings.HealabsorbColor;
+local width, height = Settings.Width, Settings.Height;
-- placeholders with visible values when error happens
-- placeholders with visible values when error happens
-local width, height = 10, 10;
local anchorX, anchorY = 10, 10;
local attributes = {};
local anchorX, anchorY = 10, 10;
local attributes = {};
@@
-69,7
+69,7
@@
local function frameHide(frame)
end
local function showTooltip(frame)
end
local function showTooltip(frame)
- GameTooltip_SetDefaultAnchor(GameTooltip,
PlayerF
rame);
+ GameTooltip_SetDefaultAnchor(GameTooltip,
f
rame);
GameTooltip:SetUnit(frame:GetAttribute("unit"));
end
GameTooltip:SetUnit(frame:GetAttribute("unit"));
end
@@
-176,9
+176,6
@@
local function setupFrame(frame, secure, unit)
frame:SetScript("OnShow", frameShow);
frame:SetScript("OnHide", frameHide);
frame:SetScript("OnEvent", unitEvent);
frame:SetScript("OnShow", frameShow);
frame:SetScript("OnHide", frameHide);
frame:SetScript("OnEvent", unitEvent);
- -- let other addons hook these to anchor tooltip elsewhere
- GameTooltip = _G["GameTooltip"];
- GameTooltip_SetDefaultAnchor = _G["GameTooltip_SetDefaultAnchor"];
secure:SetScript("OnEnter", showTooltip);
secure:SetScript("OnLeave", hideTooltip);
-- set attributes
secure:SetScript("OnEnter", showTooltip);
secure:SetScript("OnLeave", hideTooltip);
-- set attributes
@@
-236,18
+233,21
@@
local function initializeTarget(parent)
secure:SetAttribute("_onstate-vehicleui", vehicletoggle);
end
secure:SetAttribute("_onstate-vehicleui", vehicletoggle);
end
+local function loadCharSettings()
+ anchorX, anchorY = Settings.Character.AnchorX, Settings.Character.AnchorY;
+ attributes = Settings.Character.Clickheal;
+end
+
local function initialize()
local function initialize()
+ loadCharSettings();
+ -- let other addons hook these to anchor tooltip elsewhere
+ GameTooltip = _G["GameTooltip"];
+ GameTooltip_SetDefaultAnchor = _G["GameTooltip_SetDefaultAnchor"];
initializePlayer(UIParent);
initializeTarget(UIParent);
-- TODO boss frames, pet frame, (arena frames)
end
initializePlayer(UIParent);
initializeTarget(UIParent);
-- TODO boss frames, pet frame, (arena frames)
end
-local function loadCharSettings()
- width, height = Settings.Character.Width, Settings.Character.Height;
- anchorX, anchorY = Settings.Character.AnchorX, Settings.Character.AnchorY;
- attributes = Settings.Character.Clickheal;
-end
-
local hidden = false;
local function hideBlizzardFrames()
if hidden then return end
local hidden = false;
local function hideBlizzardFrames()
if hidden then return end
@@
-281,15
+281,11
@@
local function hideBlizzardFrames()
PlayerFrame:SetDontSavePosition(true);
end
PlayerFrame:SetDontSavePosition(true);
end
-UnitFrames:RegisterEvent("ADDON_LOADED");
UnitFrames:RegisterEvent("PLAYER_LOGIN");
UnitFrames:SetScript("OnEvent", function(self, event)
if event == "PLAYER_LOGIN" then
UnitFrames:RegisterEvent("PLAYER_LOGIN");
UnitFrames:SetScript("OnEvent", function(self, event)
if event == "PLAYER_LOGIN" then
+ OmaUFLoadChar();
hideBlizzardFrames();
initialize();
hideBlizzardFrames();
initialize();
- elseif event == "ADDON_LOADED" then
- OmaUFLoadChar();
- loadCharSettings();
- OmaUFEvents.LoadChar();
end
end);
end
end);