WoWInterface SVN ZoneLevel

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /ShadowExperience
    from Rev 21 to Rev 30
    Reverse comparison

Rev 21 → Rev 30

text/Rested.tga Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream
text/BottomPlayerFrame.tga Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream
text/NonRested.tga Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream
Core.lua
13,9 → 13,6
PetScale = 1;
PetHeight = 8;
PetWidth = 22;
PlayerScale = 1;
PlayerHeight = 12;
PlayerWidth = 220;
PlayerTipAnchor = "CURSOR";
 
 
25,15 → 22,7
};
 
function ShadowExperience_OnLoad()
local loaded, reason = LoadAddOn("Blizzard_AchievementUI")
if not loaded then
print("Can't load the achievement UI elements. Please check your installation.")
end
 
 
DEFAULT_CHAT_FRAME:AddMessage("ShadowExperience loaded. Please do /shadow for more.")
 
Shadow_CreateBar();
end
 
function tooltipset()
43,12 → 32,13
local ToGoLeft = floor(b-h)
local d = floor(100-c)
local retVal = GetXPExhaustion()
 
txt = c.."% into level."
txt2 = ToGoLeft.." left to level!"
txt1 = d.."% left!"
 
GameTooltip:SetOwner(PlayerExp, ShadowEOptions.PlayerTipAnchor)
GameTooltip:SetText(UnitName("Player"))
GameTooltip:SetOwner( PlayerExpT, ShadowEOptions.PlayerTipAnchor)
GameTooltip:SetText(UnitName("Player"),class)
GameTooltip:AddLine("Level "..UnitLevel("player"))
GameTooltip:AddLine(UnitXP("player").."/"..UnitXPMax("player"))
GameTooltip:AddLine(txt)
68,46 → 58,54
end
 
--exp bars
function Shadow_CreateBar()
PlayerExp = CreateFrame("StatusBar", "ShadowPlayerExperience", WorldFrame, "AchievementProgressBarTemplate");
PlayerExp:SetWidth(ShadowEOptions.PlayerWidth);
PlayerExp:SetHeight(ShadowEOptions.PlayerHeight);
PlayerExp:SetPoint("CENTER")
PlayerExp:SetOrientation("HORIZONTAL");
-- PlayerExp:SetStatusBarColor(68, 0, 68, 1);
PlayerExp:SetBackdropColor(0, 0, 0, 1);
PlayerExp:SetScript("OnEvent", function(self, event, ...)
 
PlayerExpT = CreateFrame("StatusBar", "ShadowPlayerExperience", PlayerFrame);
PlayerExpT:SetWidth(130);
PlayerExpT:SetHeight(15);
PlayerExpT:SetPoint("CENTER",45,-20)
PlayerExpT:SetOrientation("HORIZONTAL");
PlayerExpT:SetBackdropColor(0, 0, 0, 1);
PlayerExpT:EnableMouse(true)
PlayerExpT:SetScript("OnEnter", tooltipset)
PlayerExpT:SetScript("OnLeave", tooltipleave)
PlayerExpT:SetScript("OnEvent", function(self, event, ...)
if event == "PLAYER_XP_UPDATE" and arg1 == "player" then
PlayerExp:SetValue(UnitXP("player"))
PlayerExp.text:SetText(UnitXP("player").."/"..UnitXPMax("player"))
PlayerExpT:SetValue(UnitXP("player"))
PlayerExpT.text:SetText(UnitXP("player").."/"..UnitXPMax("player"))
 
local retVal = GetXPExhaustion()
if retVal == false then
PlayerExpT:SetStatusBarTexture("Interface\\AddOns\\ShadowExperience\\text\\NonRested.tga");
else
PlayerExpT:SetStatusBarTexture("Interface\\AddOns\\ShadowExperience\\text\\Rested.tga");
end
end
if event == "PLAYER_ENTERING_WORLD" then
local retVal = GetXPExhaustion()
 
PlayerExp.text:SetText(UnitXP("player").."/"..UnitXPMax("player"))
PlayerExp:SetMinMaxValues(1,UnitXPMax("player"));
PlayerExp:SetValue(UnitXP("player"))
PlayerExpT.text:SetText(UnitXP("player").."/"..UnitXPMax("player"))
PlayerExpT:SetMinMaxValues(1,UnitXPMax("player"));
PlayerExpT:SetValue(UnitXP("player"))
if retVal == false then
PlayerExp:SetStatusBarColor(68, 0, 68, 1);
PlayerExpT:SetStatusBarTexture("Interface\\AddOns\\ShadowExperience\\text\\NonRested.tga");
else
PlayerExp:SetStatusBarColor(0,0,1,1);
PlayerExpT:SetStatusBarTexture("Interface\\AddOns\\ShadowExperience\\text\\Rested.tga");
end
end
if Position then
PlayerExp:ClearAllPoints()
PlayerExp:SetPoint(unpack(Position))
end
end)
PlayerExp:SetScript("OnMouseDown", function() PlayerExp:StartMoving() end)
PlayerExp:SetScript("OnMouseUp", function() PlayerExp:StopMovingOrSizing() Position = { PlayerExp:GetPoint() } end)
PlayerExp:SetScript("OnEnter", tooltipset)
PlayerExp:SetScript("OnLeave", tooltipleave)
PlayerExp:EnableMouse(true)
PlayerExp:SetMovable(true)
PlayerExp:RegisterEvent("PLAYER_XP_UPDATE")
PlayerExp:RegisterEvent("PLAYER_ENTERING_WORLD")
PlayerExp:RegisterEvent("VARIABLES_LOADED")
end
end)
 
PlayerExpT:RegisterEvent("PLAYER_XP_UPDATE")
PlayerExpT:RegisterEvent("PLAYER_ENTERING_WORLD")
 
PlayerExpT.text = PlayerExpT:CreateFontString(nil, "OVERLAY", "GameFontNormal")
PlayerExpT.text:SetPoint("CENTER")
PlayerExpT.text:SetText("FUC")
 
PlayerExpParent = CreateFrame("Frame", "PlayerExpParent", PlayerFrame)
PlayerExpParent:SetPoint("BOTTOM",50,-65)
PlayerExpParent:SetWidth(150)
PlayerExpParent:SetHeight(100)
PlayerExpParent:SetBackdrop(nil or {bgFile = "Interface\\AddOns\\ShadowExperience\\text\\BottomPlayerFrame.tga", edgeFile = "nil", tile = false, tileSize = 0, edgeSize = 32, insets = { left = 0, right = 0, top = 0, bottom = 0 }})
--config