Fancier Interface for Worgoblin

This commit is contained in:
Ben
2024-03-11 22:55:23 -04:00
parent 1753e286c4
commit f52d7b3050
316 changed files with 10904 additions and 0 deletions

View File

@@ -0,0 +1,247 @@
<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">
<Frame name="GameMenuFrame" toplevel="true" frameStrata="DIALOG" movable="true" enableMouse="true" hidden="true" parent="UIParent">
<Size>
<AbsDimension x="195" y="270"/>
</Size>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<BackgroundInsets>
<AbsInset left="11" right="12" top="12" bottom="11"/>
</BackgroundInsets>
<TileSize>
<AbsValue val="32"/>
</TileSize>
<EdgeSize>
<AbsValue val="32"/>
</EdgeSize>
</Backdrop>
<Layers>
<Layer level="ARTWORK">
<Texture name="GameMenuFrameHeader" file="Interface\DialogFrame\UI-DialogBox-Header">
<Size>
<AbsDimension x="256" y="64"/>
</Size>
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="12"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<FontString inherits="GameFontNormal" text="MAIN_MENU">
<Anchors>
<Anchor point="TOP" relativeTo="GameMenuFrameHeader">
<Offset>
<AbsDimension x="0" y="-14"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<Button name="GameMenuButtonOptions" inherits="GameMenuButtonTemplate" text="VIDEOOPTIONS_MENU">
<Anchors>
<Anchor point="CENTER" relativePoint="TOP">
<Offset>
<AbsDimension x="0" y="-70"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
PlaySound("igMainMenuOption");
ShowUIPanel(VideoOptionsFrame);
VideoOptionsFrame.lastFrame = GameMenuFrame;
</OnClick>
</Scripts>
</Button>
<Button name="GameMenuButtonSoundOptions" inherits="GameMenuButtonTemplate" text="SOUNDOPTIONS_MENU">
<Anchors>
<Anchor point="TOP" relativeTo="GameMenuButtonOptions" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-1"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
PlaySound("igMainMenuOption");
ShowUIPanel(AudioOptionsFrame);
AudioOptionsFrame.lastFrame = GameMenuFrame;
</OnClick>
</Scripts>
</Button>
<Button name="GameMenuButtonUIOptions" inherits="GameMenuButtonTemplate" text="UIOPTIONS_MENU">
<Anchors>
<Anchor point="TOP" relativeTo="GameMenuButtonSoundOptions" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-1"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
PlaySound("igMainMenuOption");
ShowUIPanel(InterfaceOptionsFrame);
InterfaceOptionsFrame.lastFrame = GameMenuFrame;
</OnClick>
</Scripts>
</Button>
<Button name="GameMenuButtonMacOptions" inherits="GameMenuButtonTemplate" text="MAC_OPTIONS">
<Anchors>
<Anchor point="TOP" relativeTo="GameMenuButtonSoundOptions" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-1"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
PlaySound("igMainMenuOption");
HideUIPanel(GameMenuFrame);
ShowUIPanel(MacOptionsFrame);
</OnClick>
<OnLoad>
if(not IsMacClient()) then
GameMenuButtonMacOptions:Hide();
GameMenuButtonUIOptions:SetPoint("TOP", GameMenuButtonSoundOptions, "BOTTOM", 0, -1);
else
GameMenuFrame:SetHeight(266);
GameMenuButtonMacOptions:Show();
GameMenuButtonUIOptions:SetPoint("TOP", GameMenuButtonMacOptions, "BOTTOM", 0, -1);
end
</OnLoad>
</Scripts>
</Button>
<Button name="GameMenuButtonKeybindings" inherits="GameMenuButtonTemplate" text="KEY_BINDINGS">
<Anchors>
<Anchor point="TOP" relativeTo="GameMenuButtonUIOptions" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-1"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
PlaySound("igMainMenuOption");
KeyBindingFrame_LoadUI();
KeyBindingFrame.mode = 1;
ShowUIPanel(KeyBindingFrame);
</OnClick>
</Scripts>
</Button>
<Button name="GameMenuButtonMacros" inherits="GameMenuButtonTemplate" text="MACROS">
<Anchors>
<Anchor point="TOP" relativeTo="GameMenuButtonKeybindings" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-1"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
PlaySound("igMainMenuOption");
HideUIPanel(GameMenuFrame);
ShowMacroFrame();
</OnClick>
</Scripts>
</Button>
<Button name="GameMenuButtonRatings" inherits="GameMenuButtonTemplate" hidden="true" text="RATINGS_MENU">
<Anchors>
<Anchor point="TOP" relativeTo="GameMenuButtonMacros" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-1"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
PlaySound("igMainMenuOption");
HideUIPanel(GameMenuFrame);
ShowUIPanel(RatingMenuFrame);
</OnClick>
</Scripts>
</Button>
<Button name="GameMenuButtonLogout" inherits="GameMenuButtonTemplate" text="LOGOUT">
<Anchors>
<Anchor point="TOP" relativeTo="GameMenuButtonMacros" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-1"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnShow>
if (GameMenuButtonRatings:IsShown()) then
self:SetPoint("TOP", GameMenuButtonRatings, "BOTTOM", 0, -1);
end;
if ( not StaticPopup_Visible("CAMP") and not StaticPopup_Visible("QUIT") ) then
self:Enable();
else
self:Disable();
end
</OnShow>
<OnClick>
PlaySound("igMainMenuLogout");
Logout();
HideUIPanel(GameMenuFrame);
</OnClick>
</Scripts>
</Button>
<Button name="GameMenuButtonQuit" inherits="GameMenuButtonTemplate" text="EXIT_GAME">
<Anchors>
<Anchor point="TOP" relativeTo="GameMenuButtonLogout" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-1"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnShow>
if ( not StaticPopup_Visible("CAMP") and not StaticPopup_Visible("QUIT") ) then
self:Enable();
else
self:Disable();
end
</OnShow>
<OnClick>
PlaySound("igMainMenuQuit");
Quit();
HideUIPanel(GameMenuFrame);
</OnClick>
</Scripts>
</Button>
<Button name="GameMenuButtonContinue" inherits="GameMenuButtonTemplate" text="RETURN_TO_GAME">
<Anchors>
<Anchor point="TOP" relativeTo="GameMenuButtonQuit" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-16"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
PlaySound("igMainMenuContinue");
HideUIPanel(GameMenuFrame);
</OnClick>
</Scripts>
</Button>
</Frames>
<Scripts>
<OnShow>
UpdateMicroButtons();
Disable_BagButtons();
VoiceChat_Toggle();
</OnShow>
<OnHide>
UpdateMicroButtons();
Enable_BagButtons();
</OnHide>
</Scripts>
</Frame>
</Ui>

View File

@@ -0,0 +1,634 @@
NUM_PET_RESISTANCE_TYPES = 5;
NUM_PET_STATS = 5;
NUM_COMPANIONS_PER_PAGE = 12;
function PetPaperDollFrame_OnLoad (self)
self:RegisterEvent("PET_UI_UPDATE");
self:RegisterEvent("PET_BAR_UPDATE");
self:RegisterEvent("PET_UI_CLOSE");
self:RegisterEvent("UNIT_NAME_UPDATE");
self:RegisterEvent("UNIT_PET");
self:RegisterEvent("UNIT_PET_EXPERIENCE");
self:RegisterEvent("UNIT_MODEL_CHANGED");
self:RegisterEvent("UNIT_LEVEL");
self:RegisterEvent("UNIT_RESISTANCES");
self:RegisterEvent("UNIT_STATS");
self:RegisterEvent("UNIT_DAMAGE");
self:RegisterEvent("UNIT_RANGEDDAMAGE");
self:RegisterEvent("UNIT_ATTACK_SPEED");
self:RegisterEvent("UNIT_ATTACK_POWER");
self:RegisterEvent("UNIT_RANGED_ATTACK_POWER");
self:RegisterEvent("UNIT_DEFENSE");
self:RegisterEvent("UNIT_ATTACK");
self:RegisterEvent("PLAYER_ENTERING_WORLD");
self:RegisterEvent("COMPANION_LEARNED");
self:RegisterEvent("COMPANION_UNLEARNED");
self:RegisterEvent("COMPANION_UPDATE");
self:RegisterEvent("SPELL_UPDATE_COOLDOWN");
self:RegisterEvent("UNIT_ENTERED_VEHICLE");
self:RegisterEvent("UNIT_EXITED_VEHICLE");
self:RegisterEvent("PET_SPELL_POWER_UPDATE");
PetPaperDollFrameCompanionFrame.mode = "CRITTER";
PetPaperDollFrameCompanionFrame.idMount = GetCompanionInfo("MOUNT", 1);
PetPaperDollFrameCompanionFrame.pageMount = 0;
PetPaperDollFrameCompanionFrame.idCritter = GetCompanionInfo("CRITTER", 1);
PetPaperDollFrameCompanionFrame.pageCritter = 0;
PetDamageFrameLabel:SetText(format(STAT_FORMAT, DAMAGE));
PetAttackPowerFrameLabel:SetText(format(STAT_FORMAT, ATTACK_POWER));
PetArmorFrameLabel:SetText(format(STAT_FORMAT, ARMOR));
SetTextStatusBarTextPrefix(PetPaperDollFrameExpBar, XP);
PetSpellDamageFrameLabel:SetText(format(STAT_FORMAT, SPELL_BONUS));
end
local tabPoints={
[1]={ point="TOPLEFT", relativeTo="PetPaperDollFrameCompanionFrame", relativePoint="TOPLEFT", xoffset=70, yoffset=-39},
[2]={ point="LEFT", relativePoint="RIGHT", xoffset=0, yoffset=0},
[3]={ point="LEFT", relativePoint="RIGHT", xoffset=0, yoffset=0},
}
function PetPaperDollFrame_UpdateIsAvailable()
if ( (not HasPetUI()) and (GetNumCompanions("CRITTER") == 0) and (GetNumCompanions("MOUNT") == 0) ) then
PetPaperDollFrame.hidden = true;
CharacterFrameTab2:Hide();
CharacterFrameTab3:SetPoint("LEFT", "CharacterFrameTab2", "LEFT", 0, 0);
if ( PetPaperDollFrame:IsVisible() ) then --We have the pet frame selected, but nothing to show on it
ToggleCharacter("PaperDollFrame");
end
else
PetPaperDollFrame.hidden = false;
CharacterFrameTab2:Show();
CharacterFrameTab3:SetPoint("LEFT", "CharacterFrameTab2", "RIGHT", -16, 0);
end
end
function PetPaperDollFrame_UpdateTabs()
if ( not PetPaperDollFrame:IsVisible() ) then
-- There's no need to run this when the frame isn't shown (i.e. we're zoning), it causes problems with the subtabs (bug 145137)
PetPaperDollFrame_UpdateIsAvailable(); --But we still need to update the tabs on the CharacterFrame (bug 150500)
return;
end
local currVal, currRef = 1, tabPoints[1];
--PetPaperDollFrameTab1:ClearAllPoints() --Never moved, just hidden
PetPaperDollFrameTab2:ClearAllPoints()
PetPaperDollFrameTab3:ClearAllPoints()
if ( HasPetUI() ) then
PetPaperDollFrameTab1:Show();
PetPaperDollFrameTab1:SetPoint(currRef.point, currRef.relativeTo, currRef.relativePoint, currRef.xoffset, currRef.yoffset)
currVal = currVal + 1;
currRef = tabPoints[currVal];
currRef.relativeTo = PetPaperDollFrameTab1;
else
PetPaperDollFrameTab1:Hide();
end
if ( GetNumCompanions("CRITTER") > 0 ) then
PetPaperDollFrameTab2:Show();
PetPaperDollFrameTab2:SetPoint(currRef.point, currRef.relativeTo, currRef.relativePoint, currRef.xoffset, currRef.yoffset);
currVal = currVal + 1;
currRef = tabPoints[currVal];
currRef.relativeTo = PetPaperDollFrameTab2;
else
PetPaperDollFrameTab2:Hide();
end
if ( GetNumCompanions("MOUNT") > 0 ) then
PetPaperDollFrameTab3:Show();
PetPaperDollFrameTab3:SetPoint(currRef.point, currRef.relativeTo, currRef.relativePoint, currRef.xoffset, currRef.yoffset);
currVal = currVal + 1;
else
PetPaperDollFrameTab3:Hide();
end
PetPaperDollFrame_UpdateIsAvailable();
local selectedTab = PanelTemplates_GetSelectedTab(PetPaperDollFrame);
if ( (not PetPaperDollFrame.selectedTab) or (not PetPaperDollFrame_BeenViewed) or (not _G["PetPaperDollFrameTab"..selectedTab]:IsShown()) ) then
if ( PetPaperDollFrameTab1:IsShown() ) then
PetPaperDollFrame_SetTab(1);
elseif ( PetPaperDollFrameTab2:IsShown() ) then
PetPaperDollFrame_SetTab(2);
elseif ( PetPaperDollFrameTab3:IsShown() ) then
PetPaperDollFrame_SetTab(3);
else
if ( PetPaperDollFrame:IsVisible() ) then
ToggleCharacter("PaperDollFrame");
end
end
end
if ( currVal == 2 ) then --Only 1 tab shown, so no reason to make it visible.
PetPaperDollFrameTab1:Hide();
PetPaperDollFrameTab2:Hide();
PetPaperDollFrameTab3:Hide();
end
end
function PetPaperDollFrame_OnEvent (self, event, ...)
local arg1 = ...;
if ( event == "PET_UI_UPDATE" or event == "PET_UI_CLOSE" or event == "PET_BAR_UPDATE" or (event == "UNIT_PET" and arg1 == "player") or
(event == "UNIT_NAME_UPDATE" and arg1 == "pet") ) then
PetPaperDollFrame_UpdateTabs();
PetPaperDollFrame_Update();
elseif ( event == "UNIT_PET_EXPERIENCE" ) then
PetExpBar_Update();
elseif ( event == "COMPANION_LEARNED" ) then
if ( not CharacterFrame:IsVisible() ) then
SetButtonPulse(CharacterMicroButton, 60, 1);
end
if ( not PetPaperDollFrame:IsVisible() ) then
SetButtonPulse(CharacterFrameTab2, 60, 1);
end
PetPaperDollFrame_UpdateTabs();
--PetPaperDollFrame_UpdateCompanions(); --This is called in SetCompanionPage
PetPaperDollFrame_SetCompanionPage((PetPaperDollFrameCompanionFrame.mode=="MOUNT") and PetPaperDollFrameCompanionFrame.pageMount or PetPaperDollFrameCompanionFrame.pageCritter);
elseif ( event == "COMPANION_UNLEARNED" ) then
local page;
local numCompanions = GetNumCompanions(PetPaperDollFrameCompanionFrame.mode);
if ( PetPaperDollFrameCompanionFrame.mode=="MOUNT" ) then
page = PetPaperDollFrameCompanionFrame.pageMount;
if ( numCompanions > 0 ) then
PetPaperDollFrameCompanionFrame.idMount = GetCompanionInfo("MOUNT", 1);
PetPaperDollFrame_UpdateCompanionPreview();
else
PetPaperDollFrameCompanionFrame.idMount = nil;
end
else
page = PetPaperDollFrameCompanionFrame.pageCritter;
if ( numCompanions > 0 ) then
PetPaperDollFrameCompanionFrame.idCritter = GetCompanionInfo("CRITTER", 1);
PetPaperDollFrame_UpdateCompanionPreview()
else
PetPaperDollFrameCompanionFrame.idCritter = nil;
end
end
page = min(ceil(numCompanions/NUM_COMPANIONS_PER_PAGE) - 1, page);
page = max(page, 0);
PetPaperDollFrame_SetCompanionPage(page); -- The pages are 0 based to make the mathematical calculations slightly faster.
PetPaperDollFrame_UpdateTabs();
elseif ( event == "COMPANION_UPDATE" ) then
if ( not PetPaperDollFrameCompanionFrame.idMount ) then
PetPaperDollFrameCompanionFrame.idMount = GetCompanionInfo("MOUNT", 1);
end
if ( not PetPaperDollFrameCompanionFrame.idCritter ) then
PetPaperDollFrameCompanionFrame.idCritter = GetCompanionInfo("CRITTER", 1);
end
PetPaperDollFrame_UpdateCompanions();
elseif ( event == "SPELL_UPDATE_COOLDOWN" ) then
if ( self:IsVisible() ) then
PetPaperDollFrame_UpdateCompanionCooldowns();
end
elseif( event == "PET_SPELL_POWER_UPDATE" ) then
PetPaperDollFrame_SetSpellBonusDamage();
elseif ( (event == "UNIT_ENTERED_VEHICLE" or event == "UNIT_EXITED_VEHICLE") and (arg1 == "player")) then
PetPaperDollFrame_UpdateCompanions();
elseif ( arg1 == "pet" ) then
PetPaperDollFrame_Update();
end
end
function PetPaperDollFrame_SetTab(id)
if ( (id == 1) and HasPetUI() ) then --Pet Tab
PetPaperDollFrame.selectedTab=1;
PetPaperDollFramePetFrame:Show();
PetPaperDollFrameCompanionFrame:Hide();
PetNameText:SetText(UnitName("pet"));
elseif ( (id == 2) and (GetNumCompanions("CRITTER") > 0) ) then --Critter Tab
PetPaperDollFrame.selectedTab=2;
PetPaperDollFrameCompanionFrame.mode="CRITTER";
PetPaperDollFramePetFrame:Hide();
PetPaperDollFrameCompanionFrame:Show();
PetPaperDollFrame_SetCompanionPage(PetPaperDollFrameCompanionFrame.pageCritter);
for i=1,NUM_COMPANIONS_PER_PAGE do
_G["CompanionButton"..i]:SetDisabledTexture([[Interface\PetPaperDollFrame\UI-PetFrame-Slots-Companions]])
end
PetPaperDollFrame_UpdateCompanions();
PetPaperDollFrame_UpdateCompanionPreview();
PetNameText:SetText(COMPANIONS);
elseif ( (id == 3) and (GetNumCompanions("MOUNT") > 0) ) then --Mount Tab
PetPaperDollFrame.selectedTab=3;
PetPaperDollFrameCompanionFrame.mode="MOUNT";
PetPaperDollFramePetFrame:Hide();
PetPaperDollFrameCompanionFrame:Show();
PetPaperDollFrame_SetCompanionPage(PetPaperDollFrameCompanionFrame.pageMount);
for i=1,NUM_COMPANIONS_PER_PAGE do
_G["CompanionButton"..i]:SetDisabledTexture([[Interface\PetPaperDollFrame\UI-PetFrame-Slots-Mounts]]);
end
PetPaperDollFrame_UpdateCompanions();
PetPaperDollFrame_UpdateCompanionPreview();
PetNameText:SetText(MOUNTS);
end
for i=1,3 do
if ( i == id ) then
PanelTemplates_SelectTab(_G["PetPaperDollFrameTab"..i]);
else
PanelTemplates_DeselectTab(_G["PetPaperDollFrameTab"..i]);
end
end
end
function PetPaperDollFrame_FindCompanionIndex(creatureID, mode)
if ( not mode ) then
mode = PetPaperDollFrameCompanionFrame.mode;
end
if (not creatureID ) then
creatureID = (PetPaperDollFrameCompanionFrame.mode=="MOUNT") and PetPaperDollFrameCompanionFrame.idMount or PetPaperDollFrameCompanionFrame.idCritter;
end
for i=1,GetNumCompanions(mode) do
if ( GetCompanionInfo(mode, i) == creatureID ) then
return i;
end
end
return 0
end
function CompanionSummonButton_OnClick()
local selected = PetPaperDollFrame_FindCompanionIndex();
local creatureID, creatureName, spellID, icon, active = GetCompanionInfo(PetPaperDollFrameCompanionFrame.mode, selected);
if ( active ) then
DismissCompanion(PetPaperDollFrameCompanionFrame.mode);
PlaySound("igMainMenuOptionCheckBoxOn");
else
CallCompanion(PetPaperDollFrameCompanionFrame.mode, selected);
PlaySound("igMainMenuOptionCheckBoxOff");
end
end
function CompanionButton_OnLoad(self)
self:RegisterForDrag("LeftButton");
self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
end
function CompanionButton_OnDrag(self)
local offset;
if ( PetPaperDollFrameCompanionFrame.mode=="CRITTER" ) then
offset = (PetPaperDollFrameCompanionFrame.pageCritter or 0)*NUM_COMPANIONS_PER_PAGE;
elseif ( PetPaperDollFrameCompanionFrame.mode=="MOUNT" ) then
offset = (PetPaperDollFrameCompanionFrame.pageMount or 0)*NUM_COMPANIONS_PER_PAGE;
end
local dragged = self:GetID() + offset;
PickupCompanion( PetPaperDollFrameCompanionFrame.mode, dragged );
end
function CompanionButton_OnClick(self, button)
local selected, selectedID;
if ( PetPaperDollFrameCompanionFrame.mode == "CRITTER" ) then
selected = PetPaperDollFrame_FindCompanionIndex(PetPaperDollFrameCompanionFrame.idCritter);
selectedID = PetPaperDollFrameCompanionFrame.idCritter;
elseif ( PetPaperDollFrameCompanionFrame.mode == "MOUNT" ) then
selected = PetPaperDollFrame_FindCompanionIndex(PetPaperDollFrameCompanionFrame.idMount);
selectedID = PetPaperDollFrameCompanionFrame.idMount;
end
if ( button ~= "LeftButton" or ( selectedID == self.creatureID) ) then
local offset;
if ( PetPaperDollFrameCompanionFrame.mode == "CRITTER" ) then
offset = (PetPaperDollFrameCompanionFrame.pageCritter or 0) * NUM_COMPANIONS_PER_PAGE;
elseif ( PetPaperDollFrameCompanionFrame.mode == "MOUNT" ) then
offset = (PetPaperDollFrameCompanionFrame.pageMount or 0) * NUM_COMPANIONS_PER_PAGE;
end
local index = self:GetID() + offset;
if ( self.active ) then
DismissCompanion(PetPaperDollFrameCompanionFrame.mode);
else
CallCompanion(PetPaperDollFrameCompanionFrame.mode, index);
end
else
if ( PetPaperDollFrameCompanionFrame.mode == "CRITTER" ) then
PetPaperDollFrameCompanionFrame.idCritter = self.creatureID;
PetPaperDollFrame_UpdateCompanionPreview();
elseif ( PetPaperDollFrameCompanionFrame.mode == "MOUNT" ) then
PetPaperDollFrameCompanionFrame.idMount = self.creatureID;
PetPaperDollFrame_UpdateCompanionPreview();
end
end
PetPaperDollFrame_UpdateCompanions();
end
function CompanionButton_OnModifiedClick(self)
local id = self.spellID;
if ( IsModifiedClick("CHATLINK") ) then
if ( MacroFrame and MacroFrame:IsShown() ) then
local spellName = GetSpellInfo(id);
ChatEdit_InsertLink(spellName);
else
local spellLink = GetSpellLink(id)
ChatEdit_InsertLink(spellLink);
end
elseif ( IsModifiedClick("PICKUPACTION") ) then
CompanionButton_OnDrag(self);
end
PetPaperDollFrame_UpdateCompanions(); --Set up the highlights again
end
function CompanionButton_OnEnter(self)
if ( GetCVar("UberTooltips") == "1" ) then
GameTooltip_SetDefaultAnchor(GameTooltip, self);
else
GameTooltip:SetOwner(self, "ANCHOR_LEFT");
end
if ( GameTooltip:SetHyperlink("spell:"..self.spellID) ) then
self.UpdateTooltip = CompanionButton_OnEnter;
else
self.UpdateTooltip = nil;
end
GameTooltip:Show()
end
function PetPaperDollFrame_SetCompanionPage(num)
if ( PetPaperDollFrameCompanionFrame.mode == "CRITTER" ) then
PetPaperDollFrameCompanionFrame.pageCritter = num;
elseif ( PetPaperDollFrameCompanionFrame.mode == "MOUNT" ) then
PetPaperDollFrameCompanionFrame.pageMount = num;
end
num = num + 1; --For easier usage
local maxpage = ceil(GetNumCompanions(PetPaperDollFrameCompanionFrame.mode)/NUM_COMPANIONS_PER_PAGE);
CompanionPageNumber:SetFormattedText(MERCHANT_PAGE_NUMBER,num, maxpage);
if ( num <= 1 ) then
CompanionPrevPageButton:Disable();
else
CompanionPrevPageButton:Enable();
end
if ( num >= maxpage ) then
CompanionNextPageButton:Disable();
else
CompanionNextPageButton:Enable();
end
PetPaperDollFrame_UpdateCompanions();
PetPaperDollFrame_UpdateCompanionCooldowns();
end
function PetPaperDollFrame_UpdateCompanions()
local button, iconTexture, id;
local creatureID, creatureName, spellID, icon, active;
local offset, selected;
if ( PetPaperDollFrameCompanionFrame.mode == "CRITTER" ) then
offset = (PetPaperDollFrameCompanionFrame.pageCritter or 0)*NUM_COMPANIONS_PER_PAGE;
selected = PetPaperDollFrame_FindCompanionIndex(PetPaperDollFrameCompanionFrame.idCritter);
elseif ( PetPaperDollFrameCompanionFrame.mode == "MOUNT" ) then
offset = (PetPaperDollFrameCompanionFrame.pageMount or 0)*NUM_COMPANIONS_PER_PAGE;
selected = PetPaperDollFrame_FindCompanionIndex(PetPaperDollFrameCompanionFrame.idMount);
end
for i = 1, NUM_COMPANIONS_PER_PAGE do
button = _G["CompanionButton"..i];
id = i + (offset or 0);
creatureID, creatureName, spellID, icon, active = GetCompanionInfo(PetPaperDollFrameCompanionFrame.mode, id);
button.creatureID = creatureID;
button.spellID = spellID;
button.active = active;
if ( creatureID ) then
button:SetNormalTexture(icon);
button:Enable();
else
button:Disable();
end
if ( (id == selected) and creatureID ) then
button:SetChecked(true);
else
button:SetChecked(false);
end
if ( active ) then
_G["CompanionButton"..i.."ActiveTexture"]:Show();
else
_G["CompanionButton"..i.."ActiveTexture"]:Hide();
end
end
if ( selected > 0 ) then
creatureID, creatureName, spellID, icon, active = GetCompanionInfo(PetPaperDollFrameCompanionFrame.mode, selected);
if ( active and creatureID ) then
CompanionSummonButton:SetText(PetPaperDollFrameCompanionFrame.mode == "MOUNT" and BINDING_NAME_DISMOUNT or PET_DISMISS);
else
CompanionSummonButton:SetText(PetPaperDollFrameCompanionFrame.mode == "MOUNT" and MOUNT or SUMMON);
end
end
end
function PetPaperDollFrame_UpdateCompanionCooldowns()
local offset;
if ( PetPaperDollFrameCompanionFrame.mode == "CRITTER" ) then
offset = (PetPaperDollFrameCompanionFrame.pageCritter or 0)*NUM_COMPANIONS_PER_PAGE;
elseif ( PetPaperDollFrameCompanionFrame.mode == "MOUNT" ) then
offset = (PetPaperDollFrameCompanionFrame.pageMount or 0)*NUM_COMPANIONS_PER_PAGE;
end
for i = 1, NUM_COMPANIONS_PER_PAGE do
local button = _G["CompanionButton"..i];
local cooldown = _G[button:GetName().."Cooldown"];
if ( button.creatureID ) then
local start, duration, enable = GetCompanionCooldown(PetPaperDollFrameCompanionFrame.mode, offset + button:GetID());
if ( start and duration and enable ) then
CooldownFrame_SetTimer(cooldown, start, duration, enable);
end
else
cooldown:Hide();
end
end
end
function PetPaperDollFrame_UpdateCompanionPreview()
local selected = PetPaperDollFrame_FindCompanionIndex();
if (selected > 0) then
local creatureID, creatureName = GetCompanionInfo(PetPaperDollFrameCompanionFrame.mode, selected);
CompanionModelFrame:SetCreature(creatureID);
CompanionSelectedName:SetText(creatureName);
if ( creatureName == "Mountain Horse" or creatureName == "Swift Mountain Horse" ) then
CompanionModelFrame:SetPosition(0,-1,1.6);
end
end
end
PetPaperDollFrame_BeenViewed = false;
function PetPaperDollFrame_OnShow(self)
if ( self:IsVisible() ) then
PetPaperDollFrame_BeenViewed = true;
end
SetButtonPulse(CharacterFrameTab2, 0, 1); --Stop the button pulse
CharacterNameText:Hide();
PetNameText:Show();
PetPaperDollFrame_Update();
PetPaperDollFrame_UpdateTabs();
end
function PetPaperDollFrame_OnHide()
CharacterNameText:Show();
PetNameText:Hide();
end
function PetPaperDollFrame_Update()
local hasPetUI, canGainXP = HasPetUI();
if ( not hasPetUI ) then
return;
end
PetModelFrame:SetUnit("pet");
if ( UnitCreatureFamily("pet") ) then
PetLevelText:SetFormattedText(UNIT_TYPE_LEVEL_TEMPLATE,UnitLevel("pet"),UnitCreatureFamily("pet"));
end
if ( PetPaperDollFramePetFrame:IsShown() ) then
PetNameText:SetText(UnitName("pet"));
end
PetExpBar_Update();
PetPaperDollFrame_SetResistances();
PetPaperDollFrame_SetStats();
PaperDollFrame_SetDamage(PetDamageFrame, "Pet");
PaperDollFrame_SetArmor(PetArmorFrame, "Pet");
PaperDollFrame_SetAttackPower(PetAttackPowerFrame, "Pet");
PetPaperDollFrame_SetSpellBonusDamage();
if ( canGainXP ) then
PetPaperDollPetInfo:Show();
else
PetPaperDollPetInfo:Hide();
end
end
function PetPaperDollFrame_SetResistances()
local resistance;
local positive;
local negative;
local base;
local index;
local text;
local frame;
for i=1, NUM_PET_RESISTANCE_TYPES, 1 do
index = i + 1;
if ( i == NUM_PET_RESISTANCE_TYPES ) then
index = 1;
end
text = _G["PetMagicResText"..i];
frame = _G["PetMagicResFrame"..i];
base, resistance, positive, negative = UnitResistance("pet", frame:GetID());
frame.tooltip = _G["RESISTANCE"..frame:GetID().."_NAME"];
-- resistances can now be negative. Show Red if negative, Green if positive, white otherwise
if( resistance < 0 ) then
text:SetText(RED_FONT_COLOR_CODE..resistance..FONT_COLOR_CODE_CLOSE);
elseif( resistance == 0 ) then
text:SetText(resistance);
else
text:SetText(GREEN_FONT_COLOR_CODE..resistance..FONT_COLOR_CODE_CLOSE);
end
if ( positive ~= 0 or negative ~= 0 ) then
-- Otherwise build up the formula
frame.tooltip = frame.tooltip.. " ( "..HIGHLIGHT_FONT_COLOR_CODE..base;
if( positive > 0 ) then
frame.tooltip = frame.tooltip..GREEN_FONT_COLOR_CODE.." +"..positive;
end
if( negative < 0 ) then
frame.tooltip = frame.tooltip.." "..RED_FONT_COLOR_CODE..negative;
end
frame.tooltip = frame.tooltip..FONT_COLOR_CODE_CLOSE.." )";
end
end
end
function PetPaperDollFrame_SetStats()
for i=1, NUM_PET_STATS, 1 do
local label = _G["PetStatFrame"..i.."Label"];
local text = _G["PetStatFrame"..i.."StatText"];
local frame = _G["PetStatFrame"..i];
local stat;
local effectiveStat;
local posBuff;
local negBuff;
label:SetText(format(STAT_FORMAT, _G["SPELL_STAT"..i.."_NAME"]));
stat, effectiveStat, posBuff, negBuff = UnitStat("pet", i);
-- Set the tooltip text
local tooltipText = HIGHLIGHT_FONT_COLOR_CODE..format(PAPERDOLLFRAME_TOOLTIP_FORMAT, _G["SPELL_STAT"..i.."_NAME"]).." ";
if ( ( posBuff == 0 ) and ( negBuff == 0 ) ) then
text:SetText(effectiveStat);
frame.tooltip = tooltipText..effectiveStat..FONT_COLOR_CODE_CLOSE;
else
tooltipText = tooltipText..effectiveStat;
if ( posBuff > 0 or negBuff < 0 ) then
tooltipText = tooltipText.." ("..(stat - posBuff - negBuff)..FONT_COLOR_CODE_CLOSE;
end
if ( posBuff > 0 ) then
tooltipText = tooltipText..FONT_COLOR_CODE_CLOSE..GREEN_FONT_COLOR_CODE.."+"..posBuff..FONT_COLOR_CODE_CLOSE;
end
if ( negBuff < 0 ) then
tooltipText = tooltipText..RED_FONT_COLOR_CODE.." "..negBuff..FONT_COLOR_CODE_CLOSE;
end
if ( posBuff > 0 or negBuff < 0 ) then
tooltipText = tooltipText..HIGHLIGHT_FONT_COLOR_CODE..")"..FONT_COLOR_CODE_CLOSE;
end
frame.tooltip = tooltipText;
-- If there are any negative buffs then show the main number in red even if there are
-- positive buffs. Otherwise show in green.
if ( negBuff < 0 ) then
text:SetText(RED_FONT_COLOR_CODE..effectiveStat..FONT_COLOR_CODE_CLOSE);
else
text:SetText(GREEN_FONT_COLOR_CODE..effectiveStat..FONT_COLOR_CODE_CLOSE);
end
end
-- Second tooltip line
frame.tooltip2 = _G["DEFAULT_STAT"..i.."_TOOLTIP"];
if ( i == 1 ) then
local attackPower = effectiveStat-20;
frame.tooltip2 = format(frame.tooltip2, attackPower);
elseif ( i == 2 ) then
local newLineIndex = strfind(frame.tooltip2, "|n")+1;
frame.tooltip2 = strsub(frame.tooltip2, 1, newLineIndex);
frame.tooltip2 = format(frame.tooltip2, GetCritChanceFromAgility("pet"));
elseif ( i == 3 ) then
local expectedHealthGain = (((stat - posBuff - negBuff)-20)*10+20)*GetUnitHealthModifier("pet");
local realHealthGain = ((effectiveStat-20)*10+20)*GetUnitHealthModifier("pet");
local healthGain = (realHealthGain - expectedHealthGain)*GetUnitMaxHealthModifier("pet");
frame.tooltip2 = format(frame.tooltip2, healthGain);
elseif ( i == 4 ) then
if ( UnitHasMana("pet") ) then
local manaGain = ((effectiveStat-20)*15+20)*GetUnitPowerModifier("pet");
frame.tooltip2 = format(frame.tooltip2, manaGain, GetSpellCritChanceFromIntellect("pet"));
else
local newLineIndex = strfind(frame.tooltip2, "|n")+2;
frame.tooltip2 = strsub(frame.tooltip2, newLineIndex);
frame.tooltip2 = format(frame.tooltip2, GetSpellCritChanceFromIntellect("pet"));
end
elseif ( i == 5 ) then
frame.tooltip2 = format(frame.tooltip2, GetUnitHealthRegenRateFromSpirit("pet"));
if ( UnitHasMana("pet") ) then
frame.tooltip2 = frame.tooltip2.."\n"..format(MANA_REGEN_FROM_SPIRIT, GetUnitManaRegenRateFromSpirit("pet"));
end
end
end
end
function PetPaperDollFrame_SetSpellBonusDamage()
local spellDamageBonus = GetPetSpellBonusDamage();
local spellDamageBonusText = format("%d",spellDamageBonus);
PetSpellDamageFrameLabel:SetText(format(STAT_FORMAT, SPELL_BONUS));
if ( spellDamageBonus > 0 ) then
spellDamageBonusText = GREEN_FONT_COLOR_CODE.."+"..spellDamageBonusText..FONT_COLOR_CODE_CLOSE;
elseif( spellDamageBonus < 0 ) then
spellDamageBonusText = RED_FONT_COLOR_CODE..spellDamageBonusText..FONT_COLOR_CODE_CLOSE;
end
PetSpellDamageFrameStatText:SetText(spellDamageBonusText);
PetSpellDamageFrame.tooltip = HIGHLIGHT_FONT_COLOR_CODE..format(PAPERDOLLFRAME_TOOLTIP_FORMAT, SPELL_BONUS)..FONT_COLOR_CODE_CLOSE.." "..spellDamageBonusText;
PetSpellDamageFrame.tooltip2 = DEFAULT_STATSPELLBONUS_TOOLTIP;
PetSpellDamageFrame:Show();
end
function PetExpBar_Update()
local currXP, nextXP = GetPetExperience();
PetPaperDollFrameExpBar:SetMinMaxValues(min(0, currXP), nextXP);
PetPaperDollFrameExpBar:SetValue(currXP);
end

View File

@@ -0,0 +1,168 @@
<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="TaxiFrame.lua"/>
<Button name="TaxiButtonTemplate" hidden="true" parent="TaxiFrame" virtual="true">
<Size>
<AbsDimension x="16" y="16"/>
</Size>
<Anchors>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<Scripts>
<OnEnter>
TaxiNodeOnButtonEnter(self, motion);
</OnEnter>
<OnLeave>
GameTooltip:Hide();
</OnLeave>
<OnClick>
TakeTaxiNode(self:GetID());
</OnClick>
</Scripts>
<HighlightTexture file="Interface\TaxiFrame\UI-Taxi-Icon-Highlight">
<Size x="32" y="32"/>
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
</HighlightTexture>
</Button>
<Frame name="TaxiFrame" toplevel="true" movable="true" hidden="true" parent="UIParent" enableMouse="true">
<Size>
<AbsDimension x="384" y="512"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-104"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture name="TaxiPortrait">
<Size>
<AbsDimension x="58" y="58"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="8" y="-9"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
</Layer>
<Layer level="ARTWORK">
<Texture file="Interface\TaxiFrame\UI-TaxiFrame-TopLeft">
<Size>
<AbsDimension x="256" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>
</Texture>
<Texture file="Interface\TaxiFrame\UI-TaxiFrame-TopRight">
<Size>
<AbsDimension x="128" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="256" y="0"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture file="Interface\TaxiFrame\UI-TaxiFrame-BotLeft">
<Size>
<AbsDimension x="256" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-256"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture file="Interface\TaxiFrame\UI-TaxiFrame-BotRight">
<Size>
<AbsDimension x="128" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="256" y="-256"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<FontString name="TaxiMerchant" inherits="GameFontNormal">
<Size>
<AbsDimension x="250" y="14"/>
</Size>
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="5" y="-17"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
<Layer level="OVERLAY">
<Texture name="TaxiMap">
<Size>
<AbsDimension x="316" y="352"/>
</Size>
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="-13" y="-75"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
</Layer>
</Layers>
<Frames>
<Button name="TaxiCloseButton" inherits="UIPanelCloseButton">
<Anchors>
<Anchor point="TOPRIGHT" relativeTo="TaxiFrame" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="-29" y="-8"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<TaxiRouteFrame name="TaxiRouteMap">
<Size>
<AbsDimension x="316" y="352"/>
</Size>
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="-13" y="-75"/>
</Offset>
</Anchor>
</Anchors>
</TaxiRouteFrame>
</Frames>
<Scripts>
<OnLoad function="TaxiFrame_OnLoad"/>
<OnEvent function="TaxiFrame_OnEvent"/>
<OnShow>
PlaySound("igMainMenuOpen");
DrawOneHopLines();
</OnShow>
<OnHide>
CloseTaxiMap();
PlaySound("igMainMenuClose");
</OnHide>
</Scripts>
</Frame>
</Ui>

View File

@@ -0,0 +1,196 @@
<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="TutorialFrame.lua"/>
<Frame name="TutorialFrame" toplevel="true" parent="UIParent" movable="true" clampedToScreen="true" enableMouse="true" frameStrata="HIGH" hidden="true">
<Size>
<AbsDimension x="230" y="128"/>
</Size>
<Anchors>
<Anchor point="BOTTOM">
<Offset>
<AbsDimension x="0" y="100"/>
</Offset>
</Anchor>
</Anchors>
<TitleRegion setAllPoints="true"/>
<Backdrop bgFile="Interface\TutorialFrame\TutorialFrameBackground" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<EdgeSize>
<AbsValue val="16"/>
</EdgeSize>
<TileSize>
<AbsValue val="16"/>
</TileSize>
<BackgroundInsets>
<AbsInset left="3" right="5" top="3" bottom="5"/>
</BackgroundInsets>
</Backdrop>
<Layers>
<Layer level="ARTWORK">
<FontString name="TutorialFrameTitle" inherits="GameFontHighlight" justifyH="LEFT" justifyV="TOP">
<Size>
<AbsDimension x="210" y="0"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="10" y="-9"/>
</Offset>
</Anchor>
</Anchors>
<Color r="1.0" g="0.82" b="0"/>
</FontString>
<FontString name="TutorialFrameText" inherits="GameFontNormal" justifyH="LEFT">
<Size>
<AbsDimension x="210" y="0"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="TutorialFrameTitle" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-2"/>
</Offset>
</Anchor>
</Anchors>
<Color r="1.0" g="1.0" b="1.0"/>
</FontString>
</Layer>
</Layers>
<Frames>
<CheckButton name="TutorialFrameCheckButton" checked="true" inherits="UICheckButtonTemplate">
<Size>
<AbsDimension x="24" y="24"/>
</Size>
<Anchors>
<Anchor point="BOTTOMLEFT">
<Offset>
<AbsDimension x="5" y="5"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="TutorialFrameCheckboxText" inherits="GameFontNormalSmall" text="ENABLE_TUTORIAL_TEXT">
<Size>
<AbsDimension x="0" y="0"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
</CheckButton>
<Button name="TutorialFrameOkayButton" jumpNavigateStart="true">
<Size>
<AbsDimension x="76" y="21"/>
</Size>
<Anchors>
<Anchor point="BOTTOMRIGHT">
<Offset>
<AbsDimension x="-7" y="7"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick function="HideParentPanel"/>
</Scripts>
<NormalTexture inherits="DialogButtonNormalTexture"/>
<PushedTexture inherits="DialogButtonPushedTexture"/>
<HighlightTexture inherits="DialogButtonHighlightTexture"/>
<ButtonText text="OKAY"/>
<NormalFont style="GameFontNormalSmall"/>
<HighlightFont style="GameFontHighlightSmall"/>
</Button>
</Frames>
<Scripts>
<OnLoad>
self:RegisterEvent("TUTORIAL_TRIGGER");
self:RegisterEvent("CINEMATIC_STOP");
</OnLoad>
<OnHide function="TutorialFrame_OnHide"/>
<OnEvent>
local arg1 = ...;
if ( event == "TUTORIAL_TRIGGER" ) then
TutorialFrame_NewTutorial(arg1);
elseif ( event == "CINEMATIC_STOP" ) then
TutorialFrame_CheckIntro();
end
</OnEvent>
</Scripts>
</Frame>
<Button name="TutorialFrameAlertButtonTemplate" parent="UIParent" hidden="true" virtual="true">
<Size>
<AbsDimension x="34" y="42"/>
</Size>
<Anchors>
<Anchor point="BOTTOM">
<Offset>
<AbsDimension x="0" y="50"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
</OnLoad>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_LEFT");
GameTooltip:SetText(self.tooltip);
</OnEnter>
<OnLeave>
GameTooltip:Hide();
</OnLeave>
<OnClick>
TutorialFrame:Show();
self:ClearAllPoints();
self:Hide();
TutorialFrame_Update(self.id);
self.id = nil;
</OnClick>
</Scripts>
<NormalTexture file="Interface\TutorialFrame\TutorialFrameAlert">
<Size>
<AbsDimension x="34" y="42"/>
</Size>
<TexCoords left="0" right="0.53125" top="0" bottom="0.6875"/>
</NormalTexture>
<HighlightTexture file="Interface\TutorialFrame\TutorialFrameAlert" alphaMode="ADD">
<Size>
<AbsDimension x="23" y="42"/>
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="-1" y="0"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0.578125" right="0.9375" top="0" bottom="0.6875"/>
</HighlightTexture>
</Button>
<Frame name="TutorialFrameParent" toplevel="true" parent="UIParent" hidden="true">
<Size>
<AbsDimension x="10" y="10"/>
</Size>
<Anchors>
<Anchor point="BOTTOM">
<Offset>
<AbsDimension x="0" y="55"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Button name="TutorialFrameAlertButton1" parent="UIParent" hidden="true" inherits="TutorialFrameAlertButtonTemplate"/>
<Button name="TutorialFrameAlertButton2" parent="UIParent" hidden="true" inherits="TutorialFrameAlertButtonTemplate"/>
<Button name="TutorialFrameAlertButton3" parent="UIParent" hidden="true" inherits="TutorialFrameAlertButtonTemplate"/>
<Button name="TutorialFrameAlertButton4" parent="UIParent" hidden="true" inherits="TutorialFrameAlertButtonTemplate"/>
<Button name="TutorialFrameAlertButton5" parent="UIParent" hidden="true" inherits="TutorialFrameAlertButtonTemplate"/>
<Button name="TutorialFrameAlertButton6" parent="UIParent" hidden="true" inherits="TutorialFrameAlertButtonTemplate"/>
<Button name="TutorialFrameAlertButton7" parent="UIParent" hidden="true" inherits="TutorialFrameAlertButtonTemplate"/>
<Button name="TutorialFrameAlertButton8" parent="UIParent" hidden="true" inherits="TutorialFrameAlertButtonTemplate"/>
<Button name="TutorialFrameAlertButton9" parent="UIParent" hidden="true" inherits="TutorialFrameAlertButtonTemplate"/>
<Button name="TutorialFrameAlertButton10" parent="UIParent" hidden="true" inherits="TutorialFrameAlertButtonTemplate"/>
</Ui>

View File

@@ -0,0 +1,465 @@
-- functions to manage tab interfaces where only one tab of a group may be selected
function PanelTemplates_Tab_OnClick(self, frame)
PanelTemplates_SetTab(frame, self:GetID())
end
function PanelTemplates_SetTab(frame, id)
frame.selectedTab = id;
PanelTemplates_UpdateTabs(frame);
end
function PanelTemplates_GetSelectedTab(frame)
return frame.selectedTab;
end
function PanelTemplates_UpdateTabs(frame)
if ( frame.selectedTab ) then
local tab;
for i=1, frame.numTabs, 1 do
tab = _G[frame:GetName().."Tab"..i];
if ( tab.isDisabled ) then
PanelTemplates_SetDisabledTabState(tab);
elseif ( i == frame.selectedTab ) then
PanelTemplates_SelectTab(tab);
else
PanelTemplates_DeselectTab(tab);
end
end
end
end
function PanelTemplates_GetTabWidth(tab)
local tabName = tab:GetName();
local sideWidths = 2 * _G[tabName.."Left"]:GetWidth();
return tab:GetTextWidth() + sideWidths;
end
function PanelTemplates_TabResize(tab, padding, absoluteSize, maxWidth, absoluteTextSize)
local tabName = tab:GetName();
local buttonMiddle = _G[tabName.."Middle"];
local buttonMiddleDisabled = _G[tabName.."MiddleDisabled"];
local sideWidths = 2 * _G[tabName.."Left"]:GetWidth();
local tabText = _G[tab:GetName().."Text"];
local width, tabWidth;
local textWidth;
if ( absoluteTextSize ) then
textWidth = absoluteTextSize;
else
textWidth = tabText:GetWidth();
end
-- If there's an absolute size specified then use it
if ( absoluteSize ) then
if ( absoluteSize < sideWidths) then
width = 1;
tabWidth = sideWidths
else
width = absoluteSize - sideWidths;
tabWidth = absoluteSize
end
tabText:SetWidth(width);
else
-- Otherwise try to use padding
if ( padding ) then
width = textWidth + padding;
else
width = textWidth + 24;
end
-- If greater than the maxWidth then cap it
if ( maxWidth and width > maxWidth ) then
if ( padding ) then
width = maxWidth + padding;
else
width = maxWidth + 24;
end
tabText:SetWidth(width);
else
tabText:SetWidth(0);
end
tabWidth = width + sideWidths;
end
if ( buttonMiddle ) then
buttonMiddle:SetWidth(width);
end
if ( buttonMiddleDisabled ) then
buttonMiddleDisabled:SetWidth(width);
end
tab:SetWidth(tabWidth);
local highlightTexture = _G[tabName.."HighlightTexture"];
if ( highlightTexture ) then
highlightTexture:SetWidth(tabWidth);
end
end
function PanelTemplates_SetNumTabs(frame, numTabs)
frame.numTabs = numTabs;
end
function PanelTemplates_DisableTab(frame, index)
_G[frame:GetName().."Tab"..index].isDisabled = 1;
PanelTemplates_UpdateTabs(frame);
end
function PanelTemplates_EnableTab(frame, index)
local tab = _G[frame:GetName().."Tab"..index];
tab.isDisabled = nil;
-- Reset text color
tab:SetDisabledFontObject(GameFontHighlightSmall);
PanelTemplates_UpdateTabs(frame);
end
function PanelTemplates_DeselectTab(tab)
local name = tab:GetName();
_G[name.."Left"]:Show();
_G[name.."Middle"]:Show();
_G[name.."Right"]:Show();
--tab:UnlockHighlight();
tab:Enable();
_G[name.."LeftDisabled"]:Hide();
_G[name.."MiddleDisabled"]:Hide();
_G[name.."RightDisabled"]:Hide();
end
function PanelTemplates_SelectTab(tab)
local name = tab:GetName();
_G[name.."Left"]:Hide();
_G[name.."Middle"]:Hide();
_G[name.."Right"]:Hide();
--tab:LockHighlight();
tab:Disable();
tab:SetDisabledFontObject(GameFontHighlightSmall);
_G[name.."LeftDisabled"]:Show();
_G[name.."MiddleDisabled"]:Show();
_G[name.."RightDisabled"]:Show();
if ( GameTooltip:IsOwned(tab) ) then
GameTooltip:Hide();
end
end
function PanelTemplates_SetDisabledTabState(tab)
local name = tab:GetName();
_G[name.."Left"]:Show();
_G[name.."Middle"]:Show();
_G[name.."Right"]:Show();
--tab:UnlockHighlight();
tab:Disable();
tab.text = tab:GetText();
-- Gray out text
tab:SetDisabledFontObject(GameFontDisableSmall);
_G[name.."LeftDisabled"]:Hide();
_G[name.."MiddleDisabled"]:Hide();
_G[name.."RightDisabled"]:Hide();
end
function ScrollFrameTemplate_OnMouseWheel(self, value, scrollBar)
scrollBar = scrollBar or _G[self:GetName() .. "ScrollBar"];
if ( value > 0 ) then
scrollBar:SetValue(scrollBar:GetValue() - (scrollBar:GetHeight() / 2));
else
scrollBar:SetValue(scrollBar:GetValue() + (scrollBar:GetHeight() / 2));
end
end
-- Function to handle the update of manually calculated scrollframes. Used mostly for listings with an indeterminate number of items
function FauxScrollFrame_Update(frame, numItems, numToDisplay, valueStep, button, smallWidth, bigWidth, highlightFrame, smallHighlightWidth, bigHighlightWidth, alwaysShowScrollBar )
-- If more than one screen full of skills then show the scrollbar
local frameName = frame:GetName();
local scrollBar = _G[ frameName.."ScrollBar" ];
local showScrollBar;
if ( numItems > numToDisplay or alwaysShowScrollBar ) then
frame:Show();
showScrollBar = 1;
else
scrollBar:SetValue(0);
frame:Hide();
end
if ( frame:IsShown() ) then
local scrollChildFrame = _G[ frameName.."ScrollChildFrame" ];
local scrollUpButton = _G[ frameName.."ScrollBarScrollUpButton" ];
local scrollDownButton = _G[ frameName.."ScrollBarScrollDownButton" ];
local scrollFrameHeight = 0;
local scrollChildHeight = 0;
if ( numItems > 0 ) then
scrollFrameHeight = (numItems - numToDisplay) * valueStep;
scrollChildHeight = numItems * valueStep;
if ( scrollFrameHeight < 0 ) then
scrollFrameHeight = 0;
end
scrollChildFrame:Show();
else
scrollChildFrame:Hide();
end
scrollBar:SetMinMaxValues(0, scrollFrameHeight);
scrollBar:SetValueStep(valueStep);
scrollChildFrame:SetHeight(scrollChildHeight);
-- Arrow button handling
if ( scrollBar:GetValue() == 0 ) then
scrollUpButton:Disable();
else
scrollUpButton:Enable();
end
if ((scrollBar:GetValue() - scrollFrameHeight) == 0) then
scrollDownButton:Disable();
else
scrollDownButton:Enable();
end
-- Shrink because scrollbar is shown
if ( highlightFrame ) then
highlightFrame:SetWidth(smallHighlightWidth);
end
if ( button ) then
for i=1, numToDisplay do
_G[button..i]:SetWidth(smallWidth);
end
end
else
-- Widen because scrollbar is hidden
if ( highlightFrame ) then
highlightFrame:SetWidth(bigHighlightWidth);
end
if ( button ) then
for i=1, numToDisplay do
_G[button..i]:SetWidth(bigWidth);
end
end
end
return showScrollBar;
end
function FauxScrollFrame_OnVerticalScroll(self, value, itemHeight, updateFunction)
local scrollbar = _G[self:GetName().."ScrollBar"];
scrollbar:SetValue(value);
self.offset = floor((value / itemHeight) + 0.5);
if ( updateFunction ) then
updateFunction(self);
end
end
function FauxScrollFrame_GetOffset(frame)
return frame.offset;
end
function FauxScrollFrame_SetOffset(frame, offset)
frame.offset = offset;
end
-- Scrollframe functions
function ScrollFrame_OnLoad(self)
_G[self:GetName().."ScrollBarScrollDownButton"]:Disable();
_G[self:GetName().."ScrollBarScrollUpButton"]:Disable();
local scrollbar = _G[self:GetName().."ScrollBar"];
scrollbar:SetMinMaxValues(0, 0);
scrollbar:SetValue(0);
self.offset = 0;
end
function ScrollFrame_OnScrollRangeChanged(self, xrange, yrange)
local scrollbar = _G[self:GetName().."ScrollBar"];
if ( not yrange ) then
yrange = self:GetVerticalScrollRange();
end
local value = scrollbar:GetValue();
if ( value > yrange ) then
value = yrange;
end
scrollbar:SetMinMaxValues(0, yrange);
scrollbar:SetValue(value);
if ( floor(yrange) == 0 ) then
if ( self.scrollBarHideable ) then
_G[self:GetName().."ScrollBar"]:Hide();
_G[scrollbar:GetName().."ScrollDownButton"]:Hide();
_G[scrollbar:GetName().."ScrollUpButton"]:Hide();
else
_G[scrollbar:GetName().."ScrollDownButton"]:Disable();
_G[scrollbar:GetName().."ScrollUpButton"]:Disable();
_G[scrollbar:GetName().."ScrollDownButton"]:Show();
_G[scrollbar:GetName().."ScrollUpButton"]:Show();
end
_G[scrollbar:GetName().."ThumbTexture"]:Hide();
else
_G[scrollbar:GetName().."ScrollDownButton"]:Show();
_G[scrollbar:GetName().."ScrollUpButton"]:Show();
_G[self:GetName().."ScrollBar"]:Show();
_G[scrollbar:GetName().."ScrollDownButton"]:Enable();
_G[scrollbar:GetName().."ThumbTexture"]:Show();
end
-- Hide/show scrollframe borders
local top = _G[self:GetName().."Top"];
local bottom = _G[self:GetName().."Bottom"];
local middle = _G[self:GetName().."Middle"];
if ( top and bottom and self.scrollBarHideable ) then
if ( self:GetVerticalScrollRange() == 0 ) then
top:Hide();
bottom:Hide();
else
top:Show();
bottom:Show();
end
end
if ( middle and self.scrollBarHideable ) then
if ( self:GetVerticalScrollRange() == 0 ) then
middle:Hide();
else
middle:Show();
end
end
end
function ScrollingEdit_OnTextChanged(self, scrollFrame)
-- force an update when the text changes
self.handleCursorChange = true;
ScrollingEdit_OnUpdate(self, 0, scrollFrame);
end
function ScrollingEdit_OnCursorChanged(self, x, y, w, h)
self.cursorOffset = y;
self.cursorHeight = h;
self.handleCursorChange = true;
end
-- NOTE: If your edit box never shows partial lines of text, then this function will not work when you use
-- your mouse to move the edit cursor. You need the edit box to cut lines of text so that you can use your
-- mouse to highlight those partially-seen lines; otherwise you won't be able to use the mouse to move the
-- cursor above or below the current scroll area of the edit box.
function ScrollingEdit_OnUpdate(self, elapsed, scrollFrame)
local height, range, scroll, size, cursorOffset;
if ( self.handleCursorChange ) then
if ( not scrollFrame ) then
scrollFrame = self:GetParent();
end
height = scrollFrame:GetHeight();
range = scrollFrame:GetVerticalScrollRange();
scroll = scrollFrame:GetVerticalScroll();
size = height + range;
cursorOffset = -self.cursorOffset;
if ( math.floor(height) <= 0 or math.floor(range) <= 0 ) then
--Frame has no area, nothing to calculate.
return;
end
while ( cursorOffset < scroll ) do
scroll = (scroll - (height / 2));
if ( scroll < 0 ) then
scroll = 0;
end
scrollFrame:SetVerticalScroll(scroll);
end
while ( (cursorOffset + self.cursorHeight) > (scroll + height) and scroll < range ) do
scroll = (scroll + (height / 2));
if ( scroll > range ) then
scroll = range;
end
scrollFrame:SetVerticalScroll(scroll);
end
self.handleCursorChange = false;
end
end
function EditBox_HandleTabbing(self, tabList)
local editboxName = self:GetName();
local index;
for i=1, #tabList do
if ( editboxName == tabList[i] ) then
index = i;
break;
end
end
if ( IsShiftKeyDown() ) then
index = index - 1;
else
index = index + 1;
end
if ( index == 0 ) then
index = #tabList;
elseif ( index > #tabList ) then
index = 1;
end
local target = tabList[index];
_G[target]:SetFocus();
end
function EditBox_ClearFocus (self)
self:ClearFocus();
end
function EditBox_SetFocus (self)
self:SetFocus();
end
function EditBox_HighlightText (self)
self:HighlightText();
end
function EditBox_ClearHighlight (self)
self:HighlightText(0, 0);
end
UIFrameCache = CreateFrame("FRAME");
local caches = {};
function UIFrameCache:New (frameType, baseName, parent, template)
if ( self ~= UIFrameCache ) then
error("Attempt to run factory method on class member");
end
local frameCache = {};
setmetatable(frameCache, self);
self.__index = self;
frameCache.frameType = frameType;
frameCache.baseName = baseName;
frameCache.parent = parent;
frameCache.template = template;
frameCache.frames = {};
frameCache.usedFrames = {};
frameCache.numFrames = 0;
tinsert(caches, frameCache);
return frameCache;
end
function UIFrameCache:GetFrame ()
local frame = self.frames[1];
if ( frame ) then
tremove(self.frames, 1);
tinsert(self.usedFrames, frame);
return frame;
end
frame = CreateFrame(self.frameType, self.baseName .. self.numFrames + 1, self.parent, self.template);
frame.frameCache = self;
self.numFrames = self.numFrames + 1;
tinsert(self.usedFrames, frame);
return frame;
end
function UIFrameCache:ReleaseFrame (frame)
for k, v in next, self.frames do
if ( v == frame ) then
return;
end
end
for k, v in next, self.usedFrames do
if ( v == frame ) then
tinsert(self.frames, frame);
tremove(self.usedFrames, k);
break;
end
end
end

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,39 @@
<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="UIParent.lua"/>
<Frame name="UIParent" setAllPoints="true" protected="true" frameStrata="MEDIUM">
<Attributes>
<Attribute name="DEFAULT_FRAME_WIDTH" type="number" value="384"/>
<Attribute name="TOP_OFFSET" type="number" value="-104"/>
<Attribute name="LEFT_OFFSET" type="number" value="0"/>
<Attribute name="CENTER_OFFSET" type="number" value="384"/> <!-- Do not modify, updated by UpdateUIPanelPositions() -->
<Attribute name="RIGHT_OFFSET" type="number" value="768"/> <!-- Do not modify, updated by UpdateUIPanelPositions() -->
<Attribute name="RIGHT_OFFSET_BUFFER" type="number" value="80"/>
</Attributes>
<Scripts>
<!-- Register here for any events you want to monitor globally -->
<OnLoad>
UIParent_OnLoad(self);
self.firstTimeLoaded = 1;
</OnLoad>
<!-- Respond here to any events you want to monitor globally -->
<OnEvent function="UIParent_OnEvent"/>
<OnUpdate>
FCF_OnUpdate(elapsed);
ButtonPulse_OnUpdate(elapsed);
UnitPopup_OnUpdate(elapsed);
RequestBattlefieldPositions(elapsed);
AnimatedShine_OnUpdate(elapsed);
AutoCastShine_OnUpdate(nil, elapsed);
</OnUpdate>
<!-- used to properly hide and show certain frames when the UI is toggled on and off -->
<OnShow>
if ( self.firstTimeLoaded ~= 1 ) then
CloseAllWindows();
self.firstTimeLoaded = nil;
end
</OnShow>
<OnAttributeChanged function="UpdateUIPanelPositions"/>
</Scripts>
</Frame>
</Ui>

View File

@@ -0,0 +1,530 @@
<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="WatchFrame.lua"/>
<StatusBar name="AchievementProgressBarTemplate" virtual="true">
<Size>
<AbsDimension x="212" y="14"/>
</Size>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentBG">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<Color r="0" g="0" b="0" a=".4"/>
</Texture>
</Layer>
<Layer level="OVERLAY">
<FontString name="$parentText" inherits="GameFontHighlightSmall" text="700/700" justifyV="TOP">
<Size x="0" y="0"/>
<Anchors>
<Anchor point="CENTER">
<Offset x="0" y="0"/>
</Anchor>
</Anchors>
</FontString>
</Layer>
<Layer level="ARTWORK">
<Texture name="$parentBorderLeft" file="Interface\AchievementFrame\UI-Achievement-ProgressBar-Border">
<Size x="16" y="0"/>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-6" y="5"/>
</Offset>
</Anchor>
<Anchor point="BOTTOMLEFT">
<Offset>
<AbsDimension x="-6" y="-5"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0" right="0.0625" top="0" bottom="0.75"/>
</Texture>
<Texture name="$parentBorderRight" file="Interface\AchievementFrame\UI-Achievement-ProgressBar-Border">
<Size x="16" y="0"/>
<Anchors>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="6" y="5"/>
</Offset>
</Anchor>
<Anchor point="BOTTOMRIGHT">
<Offset>
<AbsDimension x="6" y="-5"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0.812" right="0.8745" top="0" bottom="0.75"/>
</Texture>
<Texture name="$parentBorderCenter" file="Interface\AchievementFrame\UI-Achievement-ProgressBar-Border">
<Size x="16"/>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentBorderLeft" relativePoint="TOPRIGHT"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentBorderRight" relativePoint="BOTTOMLEFT"/>
</Anchors>
<TexCoords left="0.0625" right="0.812" top="0" bottom="0.75"/>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnLoad>
self:SetStatusBarColor(0, .6, 0, 1);
self:SetMinMaxValues(0, 100);
self:SetValue(0);
self.text = _G[self:GetName() .. "Text"];
self:GetStatusBarTexture():SetDrawLayer("BORDER");
</OnLoad>
</Scripts>
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
</StatusBar>
<FontString name="WatchFontTemplate" inherits="GameFontHighlight" virtual="true" justifyH="LEFT" justifyV="MIDDLE">
<Size>
<AbsDimension x="0" y="16"/>
</Size>
</FontString>
<Button name="WatchFrameLinkButtonTemplate" virtual="true">
<Scripts>
<OnLoad> self:RegisterForClicks("LeftButtonUp", "RightButtonUp"); </OnLoad>
<OnClick> WatchFrameLinkButtonTemplate_OnClick(self, button, down); </OnClick>
</Scripts>
</Button>
<Button name="WatchFrameItemButtonTemplate" virtual="true">
<Size x="29" y="30"/>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentHotKey" inherits="NumberFontNormalSmallGray" justifyH="LEFT" text="RANGE_INDICATOR">
<Size>
<AbsDimension x="29" y="10"/>
</Size>
<Anchors>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="16" y="-2"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
<Layer level="BORDER">
<Texture name="$parentIconTexture"/>
<FontString name="$parentCount" inherits="NumberFontNormal" justifyH="RIGHT" hidden="true">
<Anchors>
<Anchor point="BOTTOMRIGHT">
<Offset>
<AbsDimension x="-5" y="2"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="$parentStock" inherits="NumberFontNormalYellow" justifyH="LEFT" hidden="true">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-2"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<Cooldown name="$parentCooldown" inherits="CooldownFrameTemplate"/>
</Frames>
<Scripts>
<OnLoad>
WatchFrameItem_OnLoad(self);
</OnLoad>
<OnEvent>
WatchFrameItem_OnEvent(self, event, ...);
</OnEvent>
<OnUpdate>
WatchFrameItem_OnUpdate(self, elapsed);
</OnUpdate>
<OnShow>
WatchFrameItem_OnShow(self);
</OnShow>
<OnHide>
WatchFrameItem_OnHide(self);
</OnHide>
<OnEnter>
WatchFrameItem_OnEnter(self, motion);
</OnEnter>
<OnLeave>
GameTooltip:Hide();
</OnLeave>
<OnClick>
WatchFrameItem_OnClick(self, button, down);
</OnClick>
</Scripts>
<NormalTexture name="$parentNormalTexture" file="Interface\Buttons\UI-Quickslot2">
<Size x="48" y="48"/>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</NormalTexture>
<PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
<HighlightTexture file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
</Button>
<Frame name="WatchFrameLineTemplate" virtual="true">
<Size x="0" y="16"/>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentIcon" hidden="true">
<Size x="16" y="16"/>
<Anchors>
<Anchor point="RIGHT" relativePoint="LEFT">
<Offset x="-3" y="-1"/>
</Anchor>
</Anchors>
</Texture>
<FontString name="$parentText" inherits="WatchFontTemplate">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
</FontString>
</Layer>
<Layer level="BORDER">
<Texture name="$parentBorder" file="Interface\AchievementFrame\UI-Achievement-Progressive-IconBorder" hidden="true">
<Size x="26" y="26"/>
<Anchors>
<Anchor point="CENTER" relativeTo="$parentIcon" relativePoint="CENTER">
<Offset x="0" y="0"/>
</Anchor>
</Anchors>
<TexCoords left="0" right="0.65625" top="0" bottom="0.65625"/>
</Texture>
</Layer>
</Layers>
<Frames>
<StatusBar name="$parentStatusBar" inherits="AchievementProgressBarTemplate" hidden="true">
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="10" y="0"/>
</Anchor>
<Anchor point="BOTTOMRIGHT">
<Offset x="-16" y="0"/>
</Anchor>
</Anchors>
</StatusBar>
<Button name="$parentMapButton" parentKey="mapButton">
<Size x="14" y="14"/>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentText" relativePoint="RIGHT">
<Offset x="3" y="-2"/>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
--WorldMap_OpenToQuest(self.questID);
</OnClick>
</Scripts>
<NormalTexture name="$parentNormalTexture" file="Interface/QuestFrame/UI-QuestTracker-MapButton">
<TexCoords left="0" right="0.5" top="0" bottom="0.5"/>
</NormalTexture>
<HighlightTexture name="$parentHighlightTexture" alphaMode="ADD" file="Interface/Buttons/ButtonHilight-Square"/>
<PushedTexture name="$parentPushedTexture" file="Interface/QuestFrame/UI-QuestTracker-MapButton">
<TexCoords left="0.0" right="0.5" top="0.5" bottom="1.0"/>
</PushedTexture>
</Button>
</Frames>
<Scripts>
<OnLoad>
WatchFrameLineTemplate_OnLoad(self);
</OnLoad>
</Scripts>
</Frame>
<Frame name="WatchFrame" parent="UIParent" movable="true" clampedToScreen="true" hidden="false" resizable="true" frameStrata="LOW">
<Size x="280" y="140"/>
<Anchors>
<Anchor point="TOPRIGHT" relativeTo="MinimapCluster" relativePoint="BOTTOMRIGHT">
<Offset x="0" y="10"/>
</Anchor>
</Anchors>
<ResizeBounds>
<minResize x="220" y="128"/>
<maxResize x="360" y="600"/>
</ResizeBounds>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentTitleBG" file="Interface\PaperDollInfoFrame\UI-GearManager-Title-Background">
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="9" y="-6"/>
</Anchor>
<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT">
<Offset x="-28" y="-24"/>
</Anchor>
</Anchors>
</Texture>
<Texture name="$parentDialogBG" file="Interface\Tooltips\UI-Tooltip-Background">
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="8" y="-24"/>
</Anchor>
<Anchor point="BOTTOMRIGHT">
<Offset x="-6" y="8"/>
</Anchor>
</Anchors>
<Color r="0" g="0" b="0" a=".75"/>
</Texture>
</Layer>
<Layer level="BORDER">
<Texture name="$parentTopLeft" file="Interface\PaperDollInfoFrame\UI-GearManager-Border">
<Size x="64" y="64"/>
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>
<TexCoords left="0.501953125" right="0.625" top="0" bottom="1"/>
</Texture>
<Texture name="$parentTopRight" file="Interface\PaperDollInfoFrame\UI-GearManager-Border">
<Size x="64" y="64"/>
<Anchors>
<Anchor point="TOPRIGHT"/>
</Anchors>
<TexCoords left="0.625" right="0.75" top="0" bottom="1"/>
</Texture>
<Texture name="$parentTop" file="Interface\PaperDollInfoFrame\UI-GearManager-Border">
<Size x="0" y="64"/>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentTopLeft" relativePoint="TOPRIGHT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentTopRight" relativePoint="TOPLEFT"/>
</Anchors>
<TexCoords left="0.25" right="0.369140625" top="0" bottom="1"/>
</Texture>
<Texture name="$parentBottomLeft" file="Interface\PaperDollInfoFrame\UI-GearManager-Border">
<Size x="64" y="64"/>
<Anchors>
<Anchor point="BOTTOMLEFT"/>
</Anchors>
<TexCoords left="0.751953125" right="0.875" top="0" bottom="1"/>
</Texture>
<Texture name="$parentBottomRight" file="Interface\PaperDollInfoFrame\UI-GearManager-Border">
<Size x="64" y="64"/>
<Anchors>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<TexCoords left="0.875" right="1" top="0" bottom="1"/>
</Texture>
<Texture name="$parentBottom" file="Interface\PaperDollInfoFrame\UI-GearManager-Border">
<Size x="0" y="64"/>
<Anchors>
<Anchor point="BOTTOMLEFT" relativeTo="$parentBottomLeft" relativePoint="BOTTOMRIGHT"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentBottomRight" relativePoint="BOTTOMLEFT"/>
</Anchors>
<TexCoords left="0.376953125" right="0.498046875" top="0" bottom="1"/>
</Texture>
<Texture name="$parentLeft" file="Interface\PaperDollInfoFrame\UI-GearManager-Border">
<Size x="64" y="0"/>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentTopLeft" relativePoint="BOTTOMLEFT"/>
<Anchor point="BOTTOMLEFT" relativeTo="$parentBottomLeft" relativePoint="TOPLEFT"/>
</Anchors>
<TexCoords left="0.001953125" right="0.125" top="0" bottom="1"/>
</Texture>
<Texture name="$parentRight" file="Interface\PaperDollInfoFrame\UI-GearManager-Border">
<Size x="64" y="0"/>
<Anchors>
<Anchor point="TOPRIGHT" relativeTo="$parentTopRight" relativePoint="BOTTOMRIGHT"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentBottomRight" relativePoint="TOPRIGHT"/>
</Anchors>
<TexCoords left="0.1171875" right="0.2421875" top="0" bottom="1"/>
</Texture>
</Layer>
<Layer level="ARTWORK">
<Texture name="$parentCollapsedBorderLeft" file="Interface\PaperDollInfoFrame\UI-GearManager-Collapsed">
<Size x="16" y="32"/>
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="1" y="0"/>
</Anchor>
</Anchors>
<TexCoords left="0" right="0.125" top="0" bottom="1"/>
</Texture>
<Texture name="$parentCollapsedBorderRight" file="Interface\PaperDollInfoFrame\UI-GearManager-Collapsed">
<Size x="48" y="32"/>
<Anchors>
<Anchor point="TOPRIGHT">
<Offset x="2" y="0"/>
</Anchor>
</Anchors>
<TexCoords left="0.625" right="1" top="0" bottom="1"/>
</Texture>
<Texture name="$parentCollapsedBorderCenter" file="Interface\PaperDollInfoFrame\UI-GearManager-Collapsed">
<Size x="0" y="32"/>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentCollapsedBorderLeft" relativePoint="TOPRIGHT"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentCollapsedBorderRight" relativePoint="BOTTOMLEFT"/>
</Anchors>
<TexCoords left="0.125" right="0.625" top="0" bottom="1"/>
</Texture>
</Layer>
<Layer level="OVERLAY">
<FontString name="$parentTitle" inherits="GameFontNormal" text="OBJECTIVES_TRACKER_LABEL">
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="12" y="-8"/>
</Anchor>
<Anchor point="TOPRIGHT">
<Offset x="-32" y="-8"/>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<Button name="$parentCollapseExpandButton">
<Size>
<AbsDimension x="32" y="32"/>
</Size>
<Anchors>
<Anchor point="TOPRIGHT">
<Offset x="2" y="1"/>
</Anchor>
</Anchors>
<Scripts>
<OnClick function="WatchFrame_CollapseExpandButton_OnClick"/>
</Scripts>
<NormalTexture file="Interface\Buttons\UI-Panel-CollapseButton-Up"/>
<PushedTexture file="Interface\Buttons\UI-Panel-CollapseButton-Down"/>
<DisabledTexture file="Interface\Buttons\UI-Panel-CollapseButton-Disabled"/>
<HighlightTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Highlight" alphaMode="ADD"/>
</Button>
<Button name="$parentTitleButton">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentTitleBG"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentTitleBG"/>
</Anchors>
<Frames>
<Frame name="$parentHighlight" setAllPoints="true" hidden="true">
<Layers>
<Layer level="OVERLAY">
<Texture file="Interface\Buttons\UI-ListBox-Highlight" setAllPoints="true">
<Color r="1" g="1" b="1" a="0.4"/>
</Texture>
</Layer>
</Layers>
</Frame>
</Frames>
<Scripts>
<OnLoad>
self:RegisterForClicks("RightButtonUp");
self:RegisterForDrag("LeftButton");
</OnLoad>
<OnMouseUp function="WatchFrameTitleButton_OnClick"/>
<OnDragStart>
local watchFrame = _G["WatchFrame"];
watchFrame.moving = true;
watchFrame:StartMoving();
</OnDragStart>
<OnDragStop>
local watchFrame = _G["WatchFrame"];
watchFrame.moving = nil;
watchFrame:StopMovingOrSizing();
</OnDragStop>
</Scripts>
</Button>
<Frame name="$parentMouseover">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentCollapsedBorderLeft"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Button name="$parentRightResizeThumb">
<Size x="32" y="32"/>
<Anchors>
<Anchor point="BOTTOMRIGHT">
<Offset x="-4" y="4"/>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self:RegisterForDrag("LeftButton");
</OnLoad>
<OnDragStart>
local watchFrame = _G["WatchFrame"];
if ( not watchFrame.locked ) then
watchFrame.sizing = true;
watchFrame:StartSizing("BOTTOMRIGHT");
end
</OnDragStart>
<OnDragStop>
local watchFrame = _G["WatchFrame"];
watchFrame.sizing = nil;
watchFrame:StopMovingOrSizing();
</OnDragStop>
</Scripts>
</Button>
<Button name="$parentLeftResizeThumb">
<Size x="32" y="32"/>
<Anchors>
<Anchor point="BOTTOMLEFT">
<Offset x="4" y="4"/>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self:RegisterForDrag("LeftButton");
</OnLoad>
<OnDragStart>
local watchFrame = _G["WatchFrame"];
if ( not watchFrame.locked ) then
watchFrame.sizing = true;
watchFrame:StartSizing("BOTTOMLEFT");
end
</OnDragStart>
<OnDragStop>
local watchFrame = _G["WatchFrame"];
watchFrame.sizing = nil;
watchFrame:StopMovingOrSizing();
</OnDragStop>
</Scripts>
</Button>
<Frame name="WatchFrameLines" hidden="false">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="WatchFrame" relativePoint="TOPLEFT">
<Offset x="12" y="-30"/>
</Anchor>
<Anchor point="BOTTOMRIGHT" relativeTo="WatchFrame" relativePoint="BOTTOMRIGHT">
<Offset x="-12" y="12"/>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self:SetParent(UIParent) -- Freeedoom~!
self:SetFrameStrata("LOW");
self.updateFunctions = {};
self.numFunctions = 0;
</OnLoad>
</Scripts>
</Frame>
</Frames>
<Scripts>
<OnLoad function="WatchFrame_OnLoad"/>
<OnEvent function="WatchFrame_OnEvent"/>
<OnUpdate function="WatchFrame_OnUpdate"/>
</Scripts>
</Frame>
<Frame name="WatchFrameDropDown" inherits="UIDropDownMenuTemplate" id="1" hidden="true">
<Size>
<AbsDimension x="10" y="10"/>
</Size>
<Scripts>
<OnLoad function="WatchFrameDropDown_OnLoad"/>
</Scripts>
</Frame>
</Ui>

Some files were not shown because too many files have changed in this diff Show More