X-Git-Url: https://www.aleksib.fi/git/wowui.git/blobdiff_plain/0453a59cf1f5c15fa46a1460dd12d372475b10f1..2cb3a289b5b6b45db36f6d9c722be8a30aedb3e2:/OmaAB/ExpBar.lua diff --git a/OmaAB/ExpBar.lua b/OmaAB/ExpBar.lua index 01febef..5584213 100644 --- a/OmaAB/ExpBar.lua +++ b/OmaAB/ExpBar.lua @@ -1,21 +1,18 @@ -- ExpBar.lua -if true then return end local _; local min = math.min; local IsResting = IsResting; local UnitXP, UnitXPMax, GetXPExhaustion = UnitXP, UnitXPMax, GetXPExhaustion; local CTimerAfter = C_Timer.After; -local ExhaustionToolTipText = ExhaustionToolTipText; -local GameTooltip = nil; local width = 300; local running = false; -local frame = CreateFrame("Frame", "OmaExpBar", UIParent); +local frame = CreateFrame("Frame", "OmaArtifactBar", UIParent); local function expBar() - frame:SetPoint("CENTER"); + frame:SetPoint("BOTTOM"); frame:SetWidth(width); - frame:SetHeight(10); + frame:SetHeight(8); frame.base = frame:CreateTexture(nil, "BACKGROUND"); frame.base:SetAllPoints(); frame.base:SetColorTexture(0, 0, 0, 0.5); @@ -77,12 +74,9 @@ local function expBar() frame:SetScript("OnLeave", function(frame) frame.text:Hide(); end); end -frame:RegisterEvent("PLAYER_LOGIN"); frame:SetScript("OnEvent", function(self, event) - if event == "PLAYER_LOGIN" then - GameTooltip = _G["GameTooltip"]; - if UnitLevel("player") < 120 and not IsXPUserDisabled() then - return expBar(); - end + if UnitLevel("player") < 120 and not IsXPUserDisabled() then + return expBar(); end end); +frame:RegisterEvent("PLAYER_LOGIN");