режим предателя + UI референсы и DragonUI
This commit is contained in:
@@ -0,0 +1,335 @@
|
||||
MAX_ARENA_ENEMIES = 5;
|
||||
|
||||
function ArenaEnemyFrames_OnLoad(self)
|
||||
self:RegisterEvent("CVAR_UPDATE");
|
||||
self:RegisterEvent("VARIABLES_LOADED");
|
||||
self:RegisterEvent("PLAYER_ENTERING_WORLD");
|
||||
|
||||
if ( GetCVarBool("showArenaEnemyFrames") ) then
|
||||
ArenaEnemyFrames_Enable(self);
|
||||
else
|
||||
ArenaEnemyFrames_Disable(self);
|
||||
end
|
||||
local showCastbars = GetCVarBool("showArenaEnemyCastbar");
|
||||
local castFrame;
|
||||
for i = 1, MAX_ARENA_ENEMIES do
|
||||
castFrame = _G["ArenaEnemyFrame"..i.."CastingBar"];
|
||||
castFrame.showCastbar = showCastbars;
|
||||
CastingBarFrame_UpdateIsShown(castFrame);
|
||||
end
|
||||
|
||||
UpdateArenaEnemyBackground(GetCVarBool("showPartyBackground"));
|
||||
ArenaEnemyBackground_SetOpacity(tonumber(GetCVar("partyBackgroundOpacity")));
|
||||
end
|
||||
|
||||
function ArenaEnemyFrames_OnEvent(self, event, ...)
|
||||
local arg1, arg2 = ...;
|
||||
if ( (event == "CVAR_UPDATE") and (arg1 == "SHOW_ARENA_ENEMY_FRAMES_TEXT") ) then
|
||||
if ( arg2 == "1" ) then
|
||||
ArenaEnemyFrames_Enable(self);
|
||||
else
|
||||
ArenaEnemyFrames_Disable(self);
|
||||
end
|
||||
elseif ( event == "VARIABLES_LOADED" ) then
|
||||
if ( GetCVarBool("showArenaEnemyFrames") ) then
|
||||
ArenaEnemyFrames_Enable(self);
|
||||
else
|
||||
ArenaEnemyFrames_Disable(self);
|
||||
end
|
||||
local showCastbars = GetCVarBool("showArenaEnemyCastbar");
|
||||
local castFrame;
|
||||
for i = 1, MAX_ARENA_ENEMIES do
|
||||
castFrame = _G["ArenaEnemyFrame"..i.."CastingBar"];
|
||||
castFrame.showCastbar = showCastbars;
|
||||
CastingBarFrame_UpdateIsShown(castFrame);
|
||||
end
|
||||
for i=1, MAX_ARENA_ENEMIES do
|
||||
ArenaEnemyFrame_UpdatePet(_G["ArenaEnemyFrame"..i], i, true);
|
||||
end
|
||||
UpdateArenaEnemyBackground(GetCVarBool("showPartyBackground"));
|
||||
ArenaEnemyBackground_SetOpacity(tonumber(GetCVar("partyBackgroundOpacity")));
|
||||
elseif ( event == "PLAYER_ENTERING_WORLD" ) then
|
||||
ArenaEnemyFrames_UpdateVisible();
|
||||
end
|
||||
end
|
||||
|
||||
function ArenaEnemyFrames_OnShow(self)
|
||||
--Set it up to hide stuff we don't want shown in an arena.
|
||||
ArenaEnemyFrames_UpdateWatchFrame();
|
||||
|
||||
DurabilityFrame_SetAlerts();
|
||||
UIParent_ManageFramePositions();
|
||||
end
|
||||
|
||||
function ArenaEnemyFrames_UpdateWatchFrame()
|
||||
local ArenaEnemyFrames = ArenaEnemyFrames;
|
||||
if ( not WatchFrame:IsUserPlaced() ) then
|
||||
if ( ArenaEnemyFrames:IsShown() ) then
|
||||
if ( WatchFrame_RemoveObjectiveHandler(WatchFrame_DisplayTrackedQuests) ) then
|
||||
ArenaEnemyFrames.hidWatchedQuests = true;
|
||||
end
|
||||
else
|
||||
if ( ArenaEnemyFrames.hidWatchedQuests ) then
|
||||
WatchFrame_AddObjectiveHandler(WatchFrame_DisplayTrackedQuests);
|
||||
ArenaEnemyFrames.hidWatchedQuests = false;
|
||||
end
|
||||
end
|
||||
WatchFrame_ClearDisplay();
|
||||
WatchFrame_Update();
|
||||
elseif ( ArenaEnemyFrames.hidWatchedQuests ) then
|
||||
WatchFrame_AddObjectiveHandler(WatchFrame_DisplayTrackedQuests);
|
||||
ArenaEnemyFrames.hidWatchedQuests = false;
|
||||
WatchFrame_ClearDisplay();
|
||||
WatchFrame_Update();
|
||||
end
|
||||
end
|
||||
|
||||
function ArenaEnemyFrames_OnHide(self)
|
||||
--Make the stuff that needs to be shown shown again.
|
||||
ArenaEnemyFrames_UpdateWatchFrame();
|
||||
|
||||
DurabilityFrame_SetAlerts();
|
||||
UIParent_ManageFramePositions();
|
||||
end
|
||||
|
||||
function ArenaEnemyFrames_Enable(self)
|
||||
self.show = true;
|
||||
ArenaEnemyFrames_UpdateVisible();
|
||||
end
|
||||
|
||||
function ArenaEnemyFrames_Disable(self)
|
||||
self.show = false;
|
||||
ArenaEnemyFrames_UpdateVisible();
|
||||
end
|
||||
|
||||
function ArenaEnemyFrames_UpdateVisible()
|
||||
local _, instanceType = IsInInstance();
|
||||
if ( ArenaEnemyFrames.show and (instanceType == "arena")) then
|
||||
ArenaEnemyFrames:Show();
|
||||
else
|
||||
ArenaEnemyFrames:Hide();
|
||||
end
|
||||
end
|
||||
|
||||
function ArenaEnemyFrame_OnLoad(self)
|
||||
self.statusCounter = 0;
|
||||
self.statusSign = -1;
|
||||
self.unitHPPercent = 1;
|
||||
|
||||
self.classPortrait = _G[self:GetName().."ClassPortrait"];
|
||||
ArenaEnemyFrame_UpdatePlayer(self, true);
|
||||
self:RegisterEvent("UNIT_PET");
|
||||
self:RegisterEvent("ARENA_OPPONENT_UPDATE");
|
||||
self:RegisterEvent("UNIT_NAME_UPDATE");
|
||||
|
||||
UIDropDownMenu_Initialize(self.DropDown, ArenaEnemyDropDown_Initialize, "MENU");
|
||||
|
||||
local setfocus = function()
|
||||
FocusUnit("arena"..self:GetID());
|
||||
end
|
||||
SecureUnitButton_OnLoad(self, "arena"..self:GetID(), setfocus);
|
||||
|
||||
local id = self:GetID();
|
||||
if ( UnitClass("arena"..id) and (not UnitExists("arena"..id))) then --It is possible for the unit itself to no longer exist on the client, but some of the information to remain (after reloading the UI)
|
||||
self:Show();
|
||||
ArenaEnemyFrame_Lock(self);
|
||||
elseif ( UnitExists("arenapet"..id) and ( not UnitClass("arena"..id) ) ) then --We use UnitClass because even if the unit doesn't exist on the client, we may still have enough info to populate the frame.
|
||||
ArenaEnemyFrame_SetMysteryPlayer(self);
|
||||
end
|
||||
end
|
||||
|
||||
function ArenaEnemyFrame_UpdatePlayer(self, useCVars)--At some points, we need to use CVars instead of UVars even though UVars are faster.
|
||||
local id = self:GetID();
|
||||
if ( UnitGUID(self.unit) ) then --Use UnitGUID instead of UnitExists in case the unit is a remote update.
|
||||
self:Show();
|
||||
UnitFrame_Update(self);
|
||||
end
|
||||
|
||||
local _, class = UnitClass(self.unit);
|
||||
|
||||
if( class ) then
|
||||
self.classPortrait:SetTexture("Interface\\TargetingFrame\\UI-Classes-Circles");
|
||||
self.classPortrait:SetTexCoord(unpack(CLASS_ICON_TCOORDS[class]));
|
||||
end
|
||||
|
||||
ArenaEnemyFrames_UpdateVisible();
|
||||
end
|
||||
|
||||
function ArenaEnemyFrame_Lock(self)
|
||||
self.healthbar:SetStatusBarColor(0.5, 0.5, 0.5);
|
||||
self.healthbar.lockColor = true;
|
||||
self.manabar:SetStatusBarColor(0.5, 0.5, 0.5);
|
||||
self.manabar.lockColor = true;
|
||||
self.hideStatusOnTooltip = true;
|
||||
end
|
||||
|
||||
function ArenaEnemyFrame_Unlock(self)
|
||||
self.healthbar.lockColor = false;
|
||||
self.healthbar.forceHideText = false;
|
||||
self.manabar.lockColor = false;
|
||||
self.manabar.forceHideText = false;
|
||||
self.hideStatusOnTooltip = false;
|
||||
end
|
||||
|
||||
function ArenaEnemyFrame_SetMysteryPlayer(self)
|
||||
self.healthbar:SetMinMaxValues(0,100);
|
||||
self.healthbar:SetValue(100);
|
||||
self.healthbar.forceHideText = true;
|
||||
self.manabar:SetMinMaxValues(0,100);
|
||||
self.manabar:SetValue(100);
|
||||
self.manabar.forceHideText = true;
|
||||
self.classPortrait:SetTexture("Interface\\CharacterFrame\\TempPortrait");
|
||||
self.classPortrait:SetTexCoord(0, 1, 0, 1);
|
||||
self.name:SetText("");
|
||||
ArenaEnemyFrame_Lock(self);
|
||||
self:Show();
|
||||
end
|
||||
|
||||
function ArenaEnemyFrame_OnEvent(self, event, arg1, arg2)
|
||||
if ( event == "ARENA_OPPONENT_UPDATE" and arg1 == self.unit ) then
|
||||
if ( arg2 == "seen" or arg2 == "destroyed") then
|
||||
ArenaEnemyFrame_Unlock(self);
|
||||
ArenaEnemyFrame_UpdatePlayer(self);
|
||||
|
||||
if ( self.healthbar.frequentUpdates and GetCVarBool("predictedHealth") ) then
|
||||
self.healthbar:SetScript("OnUpdate", UnitFrameHealthBar_OnUpdate);
|
||||
self.healthbar:UnregisterEvent("UNIT_HEALTH");
|
||||
end
|
||||
if ( self.manabar.frequentUpdates and GetCVarBool("predictedPower") ) then
|
||||
self.manabar:SetScript("OnUpdate", UnitFrameManaBar_OnUpdate);
|
||||
UnitFrameManaBar_UnregisterDefaultEvents(self.manabar);
|
||||
end
|
||||
UpdateArenaEnemyBackground();
|
||||
UIParent_ManageFramePositions();
|
||||
elseif ( arg2 == "unseen" ) then
|
||||
ArenaEnemyFrame_Lock(self);
|
||||
|
||||
self.healthbar:RegisterEvent("UNIT_HEALTH");
|
||||
self.healthbar:SetScript("OnUpdate", nil);
|
||||
UnitFrameManaBar_RegisterDefaultEvents(self.manabar);
|
||||
self.manabar:SetScript("OnUpdate", nil);
|
||||
elseif ( arg2 == "cleared" ) then
|
||||
ArenaEnemyFrame_Unlock(self);
|
||||
self:Hide();
|
||||
ArenaEnemyFrames_UpdateVisible();
|
||||
end
|
||||
elseif ( event == "UNIT_PET" and arg1 == self.unit ) then
|
||||
ArenaEnemyFrame_UpdatePet(self);
|
||||
elseif ( event == "UNIT_NAME_UPDATE" and arg1 == self.unit ) then
|
||||
ArenaEnemyFrame_UpdatePlayer(self);
|
||||
end
|
||||
end
|
||||
|
||||
function ArenaEnemyFrame_UpdatePet(self, id, useCVars) --At some points, we need to use CVars instead of UVars even though UVars are faster.
|
||||
if ( not id ) then
|
||||
id = self:GetID();
|
||||
end
|
||||
|
||||
local unitFrame = _G["ArenaEnemyFrame"..id];
|
||||
local petFrame = _G["ArenaEnemyFrame"..id.."PetFrame"];
|
||||
|
||||
local showArenaEnemyPets = (SHOW_ARENA_ENEMY_PETS == "1");
|
||||
if ( useCVars ) then
|
||||
showArenaEnemyPets = GetCVarBool("showArenaEnemyPets");
|
||||
end
|
||||
|
||||
if ( UnitGUID(petFrame.unit) and showArenaEnemyPets) then
|
||||
petFrame:Show();
|
||||
else
|
||||
petFrame:Hide();
|
||||
end
|
||||
|
||||
UnitFrame_Update(petFrame);
|
||||
end
|
||||
|
||||
function ArenaEnemyPetFrame_OnLoad(self)
|
||||
local id = self:GetParent():GetID();
|
||||
local prefix = "ArenaEnemyFrame"..id.."PetFrame";
|
||||
local unit = "arenapet"..id;
|
||||
UnitFrame_Initialize(self, unit, _G[prefix.."Name"], _G[prefix.."Portrait"],
|
||||
_G[prefix.."HealthBar"], _G[prefix.."HealthBarText"], _G[prefix.."ManaBar"], _G[prefix.."ManaBarText"]);
|
||||
SetTextStatusBarTextZeroText(_G[prefix.."HealthBar"], DEAD);
|
||||
_G[prefix.."Name"]:Hide();
|
||||
SecureUnitButton_OnLoad(self, unit);
|
||||
self:SetID(id);
|
||||
self:SetParent(ArenaEnemyFrames);
|
||||
ArenaEnemyFrame_UpdatePet(self, id, true);
|
||||
self:RegisterEvent("ARENA_OPPONENT_UPDATE");
|
||||
self:RegisterEvent("UNIT_CLASSIFICATION_CHANGED");
|
||||
|
||||
UIDropDownMenu_Initialize(self.DropDown, ArenaEnemyPetDropDown_Initialize, "MENU");
|
||||
|
||||
local setfocus = function()
|
||||
FocusUnit("arenapet"..self:GetID());
|
||||
end
|
||||
SecureUnitButton_OnLoad(self, "arenapet"..self:GetID(), setfocus);
|
||||
end
|
||||
|
||||
function ArenaEnemyPetFrame_OnEvent(self, event, ...)
|
||||
local arg1, arg2 = ...;
|
||||
if ( event == "ARENA_OPPONENT_UPDATE" and arg1 == self.unit ) then
|
||||
if ( arg2 == "seen" or arg2 == "destroyed") then
|
||||
ArenaEnemyFrame_Unlock(self);
|
||||
ArenaEnemyFrame_UpdatePet(self);
|
||||
UpdateArenaEnemyBackground();
|
||||
local ownerFrame = _G["ArenaEnemyFrame"..self:GetID()];
|
||||
if ( not ownerFrame:IsShown() ) then
|
||||
ArenaEnemyFrame_SetMysteryPlayer(ownerFrame);
|
||||
ownerFrame:Show();
|
||||
end
|
||||
if ( self.healthbar.frequentUpdates and GetCVarBool("predictedHealth") ) then
|
||||
self.healthbar:SetScript("OnUpdate", UnitFrameHealthBar_OnUpdate);
|
||||
self.healthbar:UnregisterEvent("UNIT_HEALTH");
|
||||
end
|
||||
if ( self.manabar.frequentUpdates and GetCVarBool("predictedPower") ) then
|
||||
self.manabar:SetScript("OnUpdate", UnitFrameManaBar_OnUpdate);
|
||||
UnitFrameManaBar_UnregisterDefaultEvents(self.manabar);
|
||||
end
|
||||
elseif ( arg2 == "unseen" ) then
|
||||
ArenaEnemyFrame_Lock(self);
|
||||
self.healthbar:RegisterEvent("UNIT_HEALTH");
|
||||
self.healthbar:SetScript("OnUpdate", nil);
|
||||
UnitFrameManaBar_RegisterDefaultEvents(self.manabar);
|
||||
self.manabar:SetScript("OnUpdate", nil);
|
||||
elseif ( arg2 == "cleared" ) then
|
||||
ArenaEnemyFrame_Unlock(self);
|
||||
self:Hide()
|
||||
end
|
||||
elseif ( event == "UNIT_CLASSIFICATION_CHANGED" and arg1 == self.unit ) then
|
||||
UnitFrame_Update(self);
|
||||
end
|
||||
UnitFrame_OnEvent(self, event, ...);
|
||||
end
|
||||
|
||||
function ArenaEnemyDropDown_Initialize(self)
|
||||
UnitPopup_ShowMenu(self, "ARENAENEMY", "arena"..self:GetParent():GetID());
|
||||
end
|
||||
|
||||
function ArenaEnemyPetDropDown_Initialize(self)
|
||||
UnitPopup_ShowMenu(self, "ARENAENEMY", "arenapet"..self:GetParent():GetID());
|
||||
end
|
||||
|
||||
function UpdateArenaEnemyBackground(force)
|
||||
if ( (SHOW_PARTY_BACKGROUND == "1") or force ) then
|
||||
ArenaEnemyBackground:Show();
|
||||
local numOpps = GetNumArenaOpponents();
|
||||
if ( numOpps > 0 ) then
|
||||
ArenaEnemyBackground:SetPoint("BOTTOMLEFT", "ArenaEnemyFrame"..numOpps.."PetFrame", "BOTTOMLEFT", -15, -10);
|
||||
else
|
||||
ArenaEnemyBackground:Hide();
|
||||
end
|
||||
else
|
||||
ArenaEnemyBackground:Hide();
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function ArenaEnemyBackground_SetOpacity(opacity)
|
||||
local alpha;
|
||||
if ( not opacity ) then
|
||||
alpha = 1.0 - OpacityFrameSlider:GetValue();
|
||||
else
|
||||
alpha = 1.0 - opacity;
|
||||
end
|
||||
ArenaEnemyBackground:SetAlpha(alpha);
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
## Interface: 30300
|
||||
## Title: Blizzard Arena UI
|
||||
## Secure: 1
|
||||
## LoadOnDemand: 1
|
||||
Blizzard_ArenaUI.xml
|
||||
Localization.lua
|
||||
@@ -0,0 +1,577 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\..\FrameXML\UI.xsd">
|
||||
<Script file="Blizzard_ArenaUI.lua"/>
|
||||
<StatusBar name="ArenaCastingBarFrameTemplate" drawLayer="BORDER" virtual="true" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="80" y="14"/>
|
||||
</Size>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<Texture setAllPoints="true">
|
||||
<Color r="0" g="0" b="0" a="0.5"/>
|
||||
</Texture>
|
||||
</Layer>
|
||||
<Layer level="ARTWORK">
|
||||
<Texture name="$parentBorderShield" file="Interface\CastingBar\UI-CastingBar-Arena-Shield" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="42" y="42"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="-25" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<FontString name="$parentText" inherits="GameFontHighlightSmall">
|
||||
<Size>
|
||||
<AbsDimension x="80" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<Texture name="$parentIcon" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT" relativeTo="$parent" relativePoint="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="-5" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
<Layer level="OVERLAY">
|
||||
<Texture name="$parentSpark" file="Interface\CastingBar\UI-CastingBar-Spark" alphaMode="ADD">
|
||||
<Size>
|
||||
<AbsDimension x="32" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER"/>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture name="$parentFlash" file="" alphaMode="ADD">
|
||||
<Size>
|
||||
<AbsDimension x="256" y="64"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="28"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
CastingBarFrame_OnLoad(self, "arena"..self:GetParent():GetID(), false, true);
|
||||
_G[self:GetName().."Icon"]:Show();
|
||||
</OnLoad>
|
||||
<OnEvent>
|
||||
CastingBarFrame_OnEvent(self, event, ...);
|
||||
</OnEvent>
|
||||
<OnUpdate>
|
||||
CastingBarFrame_OnUpdate(self, elapsed);
|
||||
</OnUpdate>
|
||||
<OnShow>
|
||||
CastingBarFrame_OnShow(self);
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
|
||||
<BarColor r="1.0" g="0.7" b="0.0"/>
|
||||
</StatusBar>
|
||||
<Button name="ArenaEnemyPetFrameTemplate" frameStrata="LOW" toplevel="true" inherits="SecureUnitButtonTemplate" virtual="true" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="77" y="31"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="15" y="-25"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="ARTWORK">
|
||||
<Texture name="$parentFlash" file="Interface\TargetingFrame\UI-PartyFrame-Flash" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="64" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="1" y="1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture name="$parentPortrait">
|
||||
<Size>
|
||||
<AbsDimension x="22" y="22"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-3" y="-3"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Frames>
|
||||
<Frame setAllPoints="true">
|
||||
<Frames>
|
||||
<Frame setAllPoints="true">
|
||||
<Layers>
|
||||
<Layer level="ARTWORK">
|
||||
<Texture name="$parentTexture" file="Interface\TargetingFrame\UI-PartyFrame">
|
||||
<Size>
|
||||
<AbsDimension x="77" y="39"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="9"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<TexCoords left="1.0" right="0" top="1.0" bottom="0.0"/>
|
||||
</Texture>
|
||||
<FontString name="$parentName" inherits="GameFontNormalSmall">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-25" y="21"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
</Frame>
|
||||
</Frames>
|
||||
</Frame>
|
||||
<StatusBar name="$parentHealthBar" inherits="TextStatusBar">
|
||||
<Size>
|
||||
<AbsDimension x="42" y="4"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-28" y="-14"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnValueChanged>
|
||||
UnitFrameHealthBar_OnValueChanged(self, value);
|
||||
</OnValueChanged>
|
||||
<OnMouseUp>
|
||||
self:GetParent():Click(button);
|
||||
</OnMouseUp>
|
||||
</Scripts>
|
||||
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
|
||||
</StatusBar>
|
||||
<StatusBar name="$parentManaBar" inherits="TextStatusBar">
|
||||
<Size>
|
||||
<AbsDimension x="42" y="4"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-28" y="-20"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnMouseUp>
|
||||
self:GetParent():Click(button);
|
||||
</OnMouseUp>
|
||||
</Scripts>
|
||||
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
|
||||
</StatusBar>
|
||||
<Frame name="$parentDropDown" inherits="UIDropDownMenuTemplate" id="1" hidden="true" parentKey="DropDown">
|
||||
<Size>
|
||||
<AbsDimension x="10" y="10"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="-20" y="-10"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Frame>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
ArenaEnemyPetFrame_OnLoad(self);
|
||||
</OnLoad>
|
||||
<OnShow>
|
||||
UnitFrame_Update(self);
|
||||
</OnShow>
|
||||
<OnEvent>
|
||||
ArenaEnemyPetFrame_OnEvent(self, event, ...);
|
||||
</OnEvent>
|
||||
<OnEnter>
|
||||
UnitFrame_OnEnter(self, motion);
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
UnitFrame_OnLeave(self, motion);
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="ArenaEnemyFrameTemplate" frameStrata="LOW" toplevel="true" movable="true" hidden="true" inherits="SecureUnitButtonTemplate" virtual="true">
|
||||
<Size>
|
||||
<AbsDimension x="102" y="32"/>
|
||||
</Size>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<Texture name="$parentFlash" file="Interface\TargetingFrame\UI-PartyFrame-Flash" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="128" y="64"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="-3" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture name="$parentClassPortrait" file="Interface\TargetingFrame\UI-Classes-Circles">
|
||||
<Size>
|
||||
<AbsDimension x="30" y="30"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-1" y="-4"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture name="$parentBackground">
|
||||
<Size>
|
||||
<AbsDimension x="72" y="17"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="-10"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Color r="0" g="0" b="0" a="0.5"/>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Frames>
|
||||
<Frame name="$parentDropDown" inherits="UIDropDownMenuTemplate" id="1" hidden="true" parentKey="DropDown">
|
||||
<Size>
|
||||
<AbsDimension x="10" y="10"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="-20" y="-10"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Frame>
|
||||
<Frame setAllPoints="true">
|
||||
<Frames>
|
||||
<Frame setAllPoints="true">
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<Texture name="$parentTexture" file="Interface\ArenaEnemyFrame\UI-ArenaTargetingFrame">
|
||||
<Size>
|
||||
<AbsDimension x="102" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<TexCoords left="0.0" right="0.796" top="0.0" bottom="0.5"/>
|
||||
</Texture>
|
||||
<FontString name="$parentName" inherits="GameFontNormalSmall" justifyH="LEFT" parentKey="name">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="3" y="24"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="$parentHealthBarText" inherits="TextStatusBarText">
|
||||
<Anchors>
|
||||
<Anchor point="CENTER">
|
||||
<Offset>
|
||||
<AbsDimension x="-20" y="3"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="$parentManaBarText" inherits="TextStatusBarText">
|
||||
<Anchors>
|
||||
<Anchor point="CENTER">
|
||||
<Offset>
|
||||
<AbsDimension x="-20" y="-6"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
<Layer level="ARTWORK">
|
||||
<Texture name="$parentStatus" file="Interface\Buttons\UI-Debuff-Overlays" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="36" y="36"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER" relativeTo="$parentPortrait">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<TexCoords left="0.0" right="0.2734375" top="0.0" bottom="0.5625"/>
|
||||
</Texture>
|
||||
</Layer>
|
||||
<Layer level="OVERLAY">
|
||||
<Texture name="$parentDisconnect" file="Interface\CharacterFrame\Disconnect-Icon" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="64" y="64"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="-7" y="-1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
</Frame>
|
||||
</Frames>
|
||||
</Frame>
|
||||
<StatusBar name="$parentHealthBar" inherits="TextStatusBar">
|
||||
<Size>
|
||||
<AbsDimension x="70" y="8"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="-12"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
TextStatusBar_Initialize(self);
|
||||
self.textLockable = 1;
|
||||
self.cvar = "partyStatusText";
|
||||
self.cvarLabel = "STATUS_TEXT_PARTY";
|
||||
</OnLoad>
|
||||
<OnMouseUp>
|
||||
self:GetParent():Click(button);
|
||||
</OnMouseUp>
|
||||
<OnValueChanged>
|
||||
UnitFrameHealthBar_OnValueChanged(self, value);
|
||||
</OnValueChanged>
|
||||
</Scripts>
|
||||
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
|
||||
</StatusBar>
|
||||
<StatusBar name="$parentManaBar" inherits="TextStatusBar">
|
||||
<Size>
|
||||
<AbsDimension x="70" y="8"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="-20"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
TextStatusBar_Initialize(self);
|
||||
self.textLockable = 1;
|
||||
self.cvar = "partyStatusText";
|
||||
self.cvarLabel = "STATUS_TEXT_PARTY";
|
||||
</OnLoad>
|
||||
<OnMouseUp>
|
||||
self:GetParent():Click(button);
|
||||
</OnMouseUp>
|
||||
</Scripts>
|
||||
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
|
||||
<BarColor r="0" g="0" b="1.0"/>
|
||||
</StatusBar>
|
||||
<Button name="$parentPetFrame" inherits="ArenaEnemyPetFrameTemplate" parentKey="petFrame"/>
|
||||
<StatusBar name="$parentCastingBar" inherits="ArenaCastingBarFrameTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT" relativePoint="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="-15" y="-3"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</StatusBar>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
local id = self:GetID();
|
||||
self.debuffCountdown = 0;
|
||||
self.numDebuffs = 0;
|
||||
self.noTextPrefix = 1;
|
||||
local prefix = "ArenaEnemyFrame"..id;
|
||||
UnitFrame_Initialize(self, "arena"..id, _G[prefix.."Name"], nil,
|
||||
_G[prefix.."HealthBar"], _G[prefix.."HealthBarText"],
|
||||
_G[prefix.."ManaBar"], _G[prefix.."ManaBarText"],
|
||||
_G[prefix.."Flash"]);
|
||||
SetTextStatusBarTextZeroText(_G[prefix.."HealthBar"], DEAD);
|
||||
ArenaEnemyFrame_OnLoad(self);
|
||||
</OnLoad>
|
||||
<OnShow>
|
||||
self:SetFrameLevel(2);
|
||||
</OnShow>
|
||||
<OnEvent>
|
||||
ArenaEnemyFrame_OnEvent(self, event, ...);
|
||||
</OnEvent>
|
||||
<OnEnter>
|
||||
UnitFrame_OnEnter(self);
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
UnitFrame_OnLeave(self);
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Frame name="ArenaEnemyFrames" hidden="true" parent="UIParent">
|
||||
<Size>
|
||||
<AbsDimension x="1" y="1"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT" relativeTo="MinimapCluster" relativePoint="BOTTOMRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-100" y="-25"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Frames>
|
||||
<Button name="ArenaEnemyFrame1" inherits="ArenaEnemyFrameTemplate" id="1">
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-2" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="ArenaEnemyFrame2" inherits="ArenaEnemyFrameTemplate" id="2">
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="ArenaEnemyFrame1" relativePoint="BOTTOM">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-20"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="ArenaEnemyFrame3" inherits="ArenaEnemyFrameTemplate" id="3">
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="ArenaEnemyFrame2" relativePoint="BOTTOM">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-20"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="ArenaEnemyFrame4" inherits="ArenaEnemyFrameTemplate" id="4">
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="ArenaEnemyFrame3" relativePoint="BOTTOM">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-20"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="ArenaEnemyFrame5" inherits="ArenaEnemyFrameTemplate" id="5">
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="ArenaEnemyFrame4" relativePoint="BOTTOM">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-20"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Frame name="ArenaEnemyBackground" frameStrata="LOW" enableMouse="true" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="125" y="10"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="ArenaEnemyFrame1">
|
||||
<Offset>
|
||||
<AbsDimension x="-15" y="6"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
<Anchor point="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Backdrop bgFile="Interface\CharacterFrame\UI-Party-Background" edgeFile="Interface\ArenaEnemyFrame\UI-Arena-Border" tile="true">
|
||||
<BackgroundInsets>
|
||||
<AbsInset left="32" right="32" top="32" bottom="32"/>
|
||||
</BackgroundInsets>
|
||||
<TileSize>
|
||||
<AbsValue val="32"/>
|
||||
</TileSize>
|
||||
<EdgeSize>
|
||||
<AbsValue val="32"/>
|
||||
</EdgeSize>
|
||||
</Backdrop>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self:RegisterEvent("VARIABLES_LOADED");
|
||||
UpdateArenaEnemyBackground();
|
||||
</OnLoad>
|
||||
<OnShow>
|
||||
self:SetFrameLevel(1);
|
||||
</OnShow>
|
||||
<OnEvent>
|
||||
if ( event == "VARIABLES_LOADED" ) then
|
||||
UpdateArenaEnemyBackground();
|
||||
OpacityFrameSlider:SetValue(tonumber(GetCVar("partyBackgroundOpacity")));
|
||||
ArenaEnemyBackground_SetOpacity();
|
||||
end
|
||||
</OnEvent>
|
||||
<OnMouseUp>
|
||||
if ( button == "RightButton" ) then
|
||||
PartyMemberBackground_ToggleOpacity(self);
|
||||
end
|
||||
</OnMouseUp>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnLoad function="ArenaEnemyFrames_OnLoad"/>
|
||||
<OnEvent function="ArenaEnemyFrames_OnEvent"/>
|
||||
<OnShow function="ArenaEnemyFrames_OnShow"/>
|
||||
<OnHide function="ArenaEnemyFrames_OnHide"/>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</Ui>
|
||||
@@ -0,0 +1 @@
|
||||
-- This file is executed at the end of addon load
|
||||
Reference in New Issue
Block a user