режим предателя + UI референсы и DragonUI

This commit is contained in:
2026-04-09 02:05:29 +04:00
parent 1109d19bb5
commit e8f1ae4ab9
397 changed files with 202750 additions and 37 deletions
@@ -0,0 +1,129 @@
INSPECTFRAME_SUBFRAMES = { "InspectPaperDollFrame", "InspectPVPFrame", "InspectTalentFrame", "InspectTalentFrame", "InspectTalentFrame" };
UIPanelWindows["InspectFrame"] = { area = "left", pushable = 0 };
function InspectFrame_Show(unit)
HideUIPanel(InspectFrame);
if ( CanInspect(unit, true) ) then
NotifyInspect(unit);
InspectFrame.unit = unit;
InspectSwitchTabs(1);
ShowUIPanel(InspectFrame);
InspectFrame_UpdateTalentTab();
end
end
function InspectFrame_OnLoad(self)
self:RegisterEvent("PLAYER_TARGET_CHANGED");
self:RegisterEvent("PARTY_MEMBERS_CHANGED");
self:RegisterEvent("UNIT_NAME_UPDATE");
self:RegisterEvent("UNIT_PORTRAIT_UPDATE");
self.unit = nil;
-- Tab Handling code
PanelTemplates_SetNumTabs(self, 3);
PanelTemplates_SetTab(self, 1);
end
function InspectFrame_OnEvent(self, event, ...)
if ( not self:IsShown() ) then
return;
end
if ( event == "PLAYER_TARGET_CHANGED" or event == "PARTY_MEMBERS_CHANGED" ) then
if ( (event == "PLAYER_TARGET_CHANGED" and self.unit == "target") or
(event == "PARTY_MEMBERS_CHANGED" and self.unit ~= "target") ) then
if ( CanInspect(self.unit) ) then
InspectFrame_UnitChanged(self);
else
HideUIPanel(InspectFrame);
end
end
return;
elseif ( event == "UNIT_NAME_UPDATE" ) then
local arg1 = ...;
if ( arg1 == self.unit ) then
InspectNameText:SetText(UnitName(arg1));
end
return;
elseif ( event == "UNIT_PORTRAIT_UPDATE" ) then
local arg1 = ...;
if ( arg1 == self.unit ) then
SetPortraitTexture(InspectFramePortrait, arg1);
end
return;
end
end
function InspectFrame_UnitChanged(self)
local unit = self.unit;
NotifyInspect(unit);
InspectPaperDollFrame_OnShow(self);
SetPortraitTexture(InspectFramePortrait, unit);
InspectNameText:SetText(UnitName(unit));
InspectFrame_UpdateTalentTab();
if ( InspectPVPFrame:IsShown() ) then
InspectPVPFrame_OnShow();
end
end
function InspectFrame_OnShow(self)
if ( not self.unit ) then
return;
end
PlaySound("igCharacterInfoOpen");
SetPortraitTexture(InspectFramePortrait, self.unit);
InspectNameText:SetText(UnitName(self.unit));
end
function InspectFrame_OnHide(self)
self.unit = nil;
PlaySound("igCharacterInfoClose");
-- Clear the player being inspected
ClearInspectPlayer();
-- in the InspectTalentFrame_Update function, a default talent tab is selected smartly if there is no tab selected
-- it actually ends up feeling natural to have this behavior happen every time the frame is shown
PanelTemplates_SetTab(InspectTalentFrame, nil);
end
function InspectFrame_OnUpdate(self)
if ( not UnitIsVisible(self.unit) ) then
HideUIPanel(InspectFrame);
end
end
function InspectSwitchTabs(newID)
local newFrame = _G[INSPECTFRAME_SUBFRAMES[newID]];
local oldFrame = _G[INSPECTFRAME_SUBFRAMES[PanelTemplates_GetSelectedTab(InspectFrame)]];
if ( newFrame ) then
if ( oldFrame ) then
oldFrame:Hide();
end
PanelTemplates_SetTab(InspectFrame, newID);
ShowUIPanel(InspectFrame);
newFrame:Show();
end
end
function InspectFrameTab_OnClick(self)
PlaySound("igCharacterInfoTab");
InspectSwitchTabs(self:GetID());
end
function InspectFrame_UpdateTalentTab()
if ( not InspectFrame.unit ) then
return;
end
local level = UnitLevel(InspectFrame.unit);
if ( level > 0 and level < 10 ) then
PanelTemplates_DisableTab(InspectFrame, 3);
if ( PanelTemplates_GetSelectedTab(InspectFrame) == 3 ) then
InspectSwitchTabs(1);
end
else
PanelTemplates_EnableTab(InspectFrame, 3);
InspectTalentFrame_UpdateTabs();
end
end
@@ -0,0 +1,9 @@
## Interface: 30300
## Title: Blizzard Inspect UI
## Secure: 1
## LoadOnDemand: 1
Blizzard_InspectUI.xml
InspectPaperDollFrame.xml
InspectPVPFrame.xml
InspectTalentFrame.xml
Localization.lua
@@ -0,0 +1,135 @@
<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_InspectUI.lua"/>
<Frame name="InspectFrame" toplevel="true" movable="true" enableMouse="true" hidden="true" parent="UIParent">
<Size>
<AbsDimension x="384" y="512"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-104"/>
</Offset>
</Anchor>
</Anchors>
<HitRectInsets>
<AbsInset left="0" right="30" top="0" bottom="45"/>
</HitRectInsets>
<Layers>
<Layer level="ARTWORK">
<Texture name="InspectFramePortrait">
<Size>
<AbsDimension x="60" y="60"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="7" y="-6"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
</Layer>
</Layers>
<Frames>
<Frame name="InspectNameFrame">
<Size>
<AbsDimension x="109" y="12"/>
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="6" y="232"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer>
<FontString name="InspectNameText" inherits="GameFontNormal" text="NAME">
<Size>
<AbsDimension x="109" y="16"/>
</Size>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Color r="1.0" g="1.0" b="1.0"/>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad function="RaiseFrameLevel"/>
</Scripts>
</Frame>
<Button name="InspectFrameCloseButton" inherits="UIPanelCloseButton">
<Anchors>
<Anchor point="CENTER" relativeTo="InspectFrame" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="-44" y="-25"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad function="RaiseFrameLevel"/>
</Scripts>
</Button>
<Button name="InspectFrameTab1" inherits="CharacterFrameTabButtonTemplate" id="1" text="CHARACTER">
<Anchors>
<Anchor point="CENTER" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="60" y="61"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick function="InspectFrameTab_OnClick"/>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(CHARACTER_INFO, 1.0,1.0,1.0 );
</OnEnter>
<OnLeave function="GameTooltip_Hide"/>
</Scripts>
</Button>
<Button name="InspectFrameTab2" inherits="CharacterFrameTabButtonTemplate" id="2" text="PVP">
<Anchors>
<Anchor point="LEFT" relativeTo="InspectFrameTab1" relativePoint="RIGHT">
<Offset>
<AbsDimension x="-16" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick function="InspectFrameTab_OnClick"/>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(PLAYER_V_PLAYER, 1.0,1.0,1.0 );
</OnEnter>
<OnLeave function="GameTooltip_Hide"/>
</Scripts>
</Button>
<Button name="InspectFrameTab3" inherits="CharacterFrameTabButtonTemplate" id="3" text="TALENTS">
<Anchors>
<Anchor point="LEFT" relativeTo="InspectFrameTab2" relativePoint="RIGHT">
<Offset>
<AbsDimension x="-16" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick function="InspectFrameTab_OnClick"/>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(TALENTS, 1.0,1.0,1.0 );
</OnEnter>
<OnLeave function="GameTooltip_Hide"/>
</Scripts>
</Button>
</Frames>
<Scripts>
<OnLoad function="InspectFrame_OnLoad"/>
<OnEvent function="InspectFrame_OnEvent"/>
<OnShow function="InspectFrame_OnShow"/>
<OnHide function="InspectFrame_OnHide"/>
<OnUpdate function="InspectFrame_OnUpdate"/>
</Scripts>
</Frame>
</Ui>
@@ -0,0 +1,79 @@
function InspectHonorFrame_OnLoad(self)
self:RegisterEvent("INSPECT_HONOR_UPDATE");
end
function InspectHonorFrame_OnEvent(self, event, ...)
if ( event == "INSPECT_HONOR_UPDATE" ) then
InspectHonorFrame_Update();
end
end
function InspectHonorFrame_OnShow()
if ( not HasInspectHonorData() ) then
RequestInspectHonorData();
else
InspectHonorFrame_Update();
end
end
function InspectHonorFrame_Update()
local todayHK, todayHonor, yesterdayHK, yesterdayHonor, lifetimeHK, lifetimeRank = GetInspectHonorData();
-- Yesterday's values
InspectHonorFrameYesterdayHKValue:SetText(yesterdayHK);
InspectHonorFrameYesterdayContributionValue:SetText(yesterdayHonor);
-- This week's values
--InspectHonorFrameThisWeekHKValue:SetText(thisweekHK);
--InspectHonorFrameThisWeekContributionValue:SetText(thisweekHonor);
-- Last Week's values
--InspectHonorFrameLastWeekHKValue:SetText(lastweekHK);
--InspectHonorFrameLastWeekContributionValue:SetText(lastweekHonor);
--InspectHonorFrameLastWeekStandingValue:SetText(lastweekStanding);
-- This session's values
InspectHonorFrameCurrentHKValue:SetText(todayHK);
--InspectHonorFrameCurrentDKValue:SetText(sessionDK);
-- Lifetime stats
InspectHonorFrameLifeTimeHKValue:SetText(lifetimeHK);
--InspectHonorFrameLifeTimeDKValue:SetText(lifetimeDK);
local rankName, rankNumber = GetPVPRankInfo(lifetimeRank);
if ( not rankName ) then
rankName = NONE;
end
InspectHonorFrameLifeTimeRankValue:SetText(rankName);
-- Set rank name and number
rankName, rankNumber = GetPVPRankInfo(UnitPVPRank("target"));
if ( not rankName ) then
rankName = NONE;
end
InspectHonorFrameCurrentPVPRank:SetText("("..RANK.." "..rankNumber..")");
InspectHonorFrameCurrentPVPRank:Show();
InspectHonorFrameCurrentPVPTitle:SetText(rankName);
InspectHonorFrameCurrentPVPTitle:Show();
-- Set icon
if ( rankNumber > 0 ) then
InspectHonorFramePvPIcon:SetTexture(format("%s%02d","Interface\\PvPRankBadges\\PvPRank",rankNumber));
InspectHonorFramePvPIcon:Show();
else
InspectHonorFramePvPIcon:Hide();
end
-- Set rank progress and bar color
local factionGroup, factionName = UnitFactionGroup("target");
if ( factionGroup == "Alliance" ) then
InspectHonorFrameProgressBar:SetStatusBarColor(0.05, 0.15, 0.36);
else
InspectHonorFrameProgressBar:SetStatusBarColor(0.63, 0.09, 0.09);
end
--InspectHonorFrameProgressBar:SetValue(GetInspectPVPRankProgress());
-- Recenter rank text
InspectHonorFrameCurrentPVPTitle:SetPoint("TOP", "InspectHonorFrame", "TOP", - InspectHonorFrameCurrentPVPRank:GetWidth()/2, -83);
end
@@ -0,0 +1,351 @@
<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="InspectHonorFrame.lua"/>
<Frame name="InspectHonorFrame" setAllPoints="true" enableMouse="true" parent="InspectFrame" hidden="true" id="2">
<HitRectInsets>
<AbsInset left="0" right="30" top="0" bottom="75"/>
</HitRectInsets>
<Layers>
<Layer level="BACKGROUND">
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-TopLeft">
<Size>
<AbsDimension x="256" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="2" y="-1"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-TopRight">
<Size>
<AbsDimension x="128" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="258" y="-1"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-BottomLeft">
<Size>
<AbsDimension x="256" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="2" y="-257"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-BottomRight">
<Size>
<AbsDimension x="128" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="258" y="-257"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
</Layer>
<Layer level="ARTWORK">
<Texture file="Interface\PaperDollInfoFrame\UI-Character-Honor-TopLeft">
<Size>
<AbsDimension x="256" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="22" y="-69"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-Honor-TopRight">
<Size>
<AbsDimension x="128" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="275" y="-69"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-Honor-BottomLeft">
<Size>
<AbsDimension x="256" y="128"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="22" y="-325"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-Honor-BottomRight">
<Size>
<AbsDimension x="128" y="128"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="275" y="-325"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<FontString name="InspectHonorFrameCurrentPVPTitle" inherits="GameFontNormal">
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="-81"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="InspectHonorFrameCurrentPVPRank" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="LEFT" relativeTo="InspectHonorFrameCurrentPVPTitle" relativePoint="RIGHT">
<Offset>
<AbsDimension x="5" y="-1"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="InspectHonorFrameCurrentSessionTitle" inherits="GameFontNormal" text="HONOR_THIS_SESSION">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="36" y="-112"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="InspectHonorFrameYesterdayTitle" inherits="GameFontNormal" text="HONOR_YESTERDAY">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHonorFrameCurrentSessionTitle" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-41"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="InspectHonorFrameThisWeekTitle" inherits="GameFontNormal" text="HONOR_THISWEEK">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHonorFrameYesterdayTitle" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-43"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="InspectHonorFrameLastWeekTitle" inherits="GameFontNormal" text="HONOR_LASTWEEK">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHonorFrameThisWeekTitle" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-42"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="InspectHonorFrameLifeTimeTitle" inherits="GameFontNormal" text="HONOR_LIFETIME">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHonorFrameLastWeekTitle" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-64"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
<Layer level="OVERLAY">
<Texture name="InspectHonorFramePvPIcon">
<Size>
<AbsDimension x="24" y="24"/>
</Size>
<Anchors>
<Anchor point="RIGHT" relativeTo="InspectHonorFrameCurrentPVPTitle" relativePoint="LEFT">
<Offset>
<AbsDimension x="-5" y="0"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
</Layer>
</Layers>
<Frames>
<Frame name="InspectHonorFrameCurrentHK" inherits="HonorFrameHKButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHonorFrameCurrentSessionTitle" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="10" y="-3"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Frame name="InspectHonorFrameCurrentDK" inherits="HonorFrameDKButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHonorFrameCurrentHK" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-2"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Frame name="InspectHonorFrameYesterdayHK" inherits="HonorFrameHKButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHonorFrameYesterdayTitle" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="10" y="-3"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Frame name="InspectHonorFrameYesterdayContribution" inherits="HonorFrameContributionButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHonorFrameYesterdayHK" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-3"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Frame name="InspectHonorFrameThisWeekHK" inherits="HonorFrameHKButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHonorFrameThisWeekTitle" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="10" y="-3"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Frame name="InspectHonorFrameThisWeekContribution" inherits="HonorFrameContributionButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHonorFrameThisWeekHK" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-3"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Frame name="InspectHonorFrameLastWeekHK" inherits="HonorFrameHKButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHonorFrameLastWeekTitle" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="10" y="-3"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Frame name="InspectHonorFrameLastWeekContribution" inherits="HonorFrameContributionButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHonorFrameLastWeekHK" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-2"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Frame name="InspectHonorFrameLastWeekStanding" inherits="HonorFrameStandingButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHonorFrameLastWeekContribution" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-2"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Frame name="InspectHonorFrameLifeTimeHK" inherits="HonorFrameHKButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHonorFrameLifeTimeTitle" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="10" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Frame name="InspectHonorFrameLifeTimeDK" inherits="HonorFrameDKButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHonorFrameLifeTimeHK" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Frame name="InspectHonorFrameLifeTimeRank" inherits="HonorFrameRankButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHonorFrameLifeTimeDK" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Frame name="InspectHonorFrameRankButton" enableMouse="true" hidden="false">
<Size>
<AbsDimension x="10" y="24"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="InspectHonorFramePvPIcon"/>
<Anchor point="RIGHT" relativeTo="InspectHonorFrameCurrentPVPRank"/>
</Anchors>
<Scripts>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(RANK, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
GameTooltip:AddLine(NEWBIE_TOOLTIP_RANK, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1);
GameTooltip:Show();
</OnEnter>
<OnLeave function="GameTooltip_Hide"/>
</Scripts>
</Frame>
<StatusBar name="InspectHonorFrameProgressBar" drawLayer="BORDER" minValue="0" maxValue="1" defaultValue="0">
<Size>
<AbsDimension x="315" y="29"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="22" y="-77"/>
</Offset>
</Anchor>
</Anchors>
<Frames>
<Frame name="InspectHonorFrameProgressButton" enableMouse="true" setAllPoints="true">
<Scripts>
<OnLoad function="LowerFrameLevel"/>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(RANK_POSITION, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
GameTooltip:AddLine(NEWBIE_TOOLTIP_RANK_POSITION, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1);
GameTooltip:Show();
</OnEnter>
<OnLeave function="GameTooltip_Hide"/>
</Scripts>
</Frame>
</Frames>
<Scripts>
<OnLoad function="LowerFrameLevel"/>
</Scripts>
<BarTexture name="$parentBar" file="Interface\PaperDollInfoFrame\UI-Character-Skills-Bar" />
</StatusBar>
</Frames>
<Scripts>
<OnLoad function="InspectHonorFrame_OnLoad"/>
<OnShow function="InspectHonorFrame_OnShow"/>
<OnEvent function="InspectHonorFrame_OnEvent"/>
</Scripts>
</Frame>
</Ui>
@@ -0,0 +1,176 @@
function InspectPVPFrame_OnLoad(self)
InspectPVPFrameLine1:SetAlpha(0.3);
InspectPVPHonorKillsLabel:SetVertexColor(0.6, 0.6, 0.6);
InspectPVPHonorHonorLabel:SetVertexColor(0.6, 0.6, 0.6);
InspectPVPHonorTodayLabel:SetVertexColor(0.6, 0.6, 0.6);
InspectPVPHonorYesterdayLabel:SetVertexColor(0.6, 0.6, 0.6);
InspectPVPHonorLifetimeLabel:SetVertexColor(0.6, 0.6, 0.6);
self:RegisterEvent("INSPECT_HONOR_UPDATE");
end
function InspectPVPFrame_OnEvent(self, event, ...)
if ( event == "INSPECT_HONOR_UPDATE" ) then
InspectPVPFrame_Update();
end
end
function InspectPVPFrame_OnShow()
InspectPVPFrame_Update();
if ( not HasInspectHonorData() ) then
RequestInspectHonorData();
else
InspectPVPFrame_Update();
end
end
function InspectPVPFrame_SetFaction()
local factionGroup = UnitFactionGroup("player");
if ( factionGroup ) then
InspectPVPFrameHonorIcon:SetTexture("Interface\\TargetingFrame\\UI-PVP-"..factionGroup);
InspectPVPFrameHonorIcon:Show();
end
end
function InspectPVPFrame_Update()
for i=1, MAX_ARENA_TEAMS do
GetInspectArenaTeamData(i);
end
InspectPVPFrame_SetFaction();
InspectPVPHonor_Update();
InspectPVPTeam_Update();
end
function InspectPVPTeam_Update()
-- Display Elements
local button, buttonName, highlight, data, standard, emblem, border;
-- Data Elements
local teamName, teamSize, teamRating, teamPlayed, teamWins, teamLoss, playerPlayed, playerRating, playerPlayedPct, teamRank;
local background = {};
local borderColor = {};
local emblemColor = {};
local ARENA_TEAMS = {};
ARENA_TEAMS[1] = {size = 2};
ARENA_TEAMS[2] = {size = 3};
ARENA_TEAMS[3] = {size = 5};
-- Sort teams by size
local buttonIndex = 0;
for index, value in pairs(ARENA_TEAMS) do
for i=1, MAX_ARENA_TEAMS do
teamName, teamSize = GetInspectArenaTeamData(i);
if ( value.size == teamSize ) then
value.index = i;
end
end
end
-- fill out data
for index, value in pairs(ARENA_TEAMS) do
if ( value.index ) then
buttonIndex = buttonIndex + 1;
-- Pull Values
teamName, teamSize, teamRating, teamPlayed, teamWins, playerPlayed, playerRating, background.r, background.g, background.b, emblem, emblemColor.r, emblemColor.g, emblemColor.b, border, borderColor.r, borderColor.g, borderColor.b = GetInspectArenaTeamData(value.index);
teamLoss = teamPlayed - teamWins;
if ( teamPlayed ~= 0 ) then
playerPlayedPct = floor( ( playerPlayed / teamPlayed ) * 100 );
else
playerPlayedPct = floor( ( playerPlayed / 1 ) * 100 );
end
-- Set button elements to variables
button = _G["InspectPVPTeam"..buttonIndex];
buttonName = "InspectPVPTeam"..buttonIndex;
data = buttonName.."Data";
standard = buttonName.."Standard";
button:SetID(value.index);
-- Populate Data
_G[data.."TypeLabel"]:SetText(ARENA_THIS_SEASON);
_G[data.."Name"]:SetText(teamName);
_G[data.."Rating"]:SetText(teamRating);
_G[data.."Games"]:SetText(teamPlayed);
_G[data.."Wins"]:SetText(teamWins);
_G[data.."Loss"]:SetText(teamLoss);
_G[data.."Played"]:SetText(playerRating);
_G[data.."Played"]:SetVertexColor(1.0, 1.0, 1.0);
_G[data.."PlayedLabel"]:SetText(RATING);
-- Set TeamSize Banner
_G[standard.."Banner"]:SetTexture("Interface\\PVPFrame\\PVP-Banner-"..teamSize);
_G[standard.."Banner"]:SetVertexColor(background.r, background.g, background.b);
_G[standard.."Border"]:SetVertexColor(borderColor.r, borderColor.g, borderColor.b);
_G[standard.."Emblem"]:SetVertexColor(emblemColor.r, emblemColor.g, emblemColor.b);
if ( border ~= -1 ) then
_G[standard.."Border"]:SetTexture("Interface\\PVPFrame\\PVP-Banner-"..teamSize.."-Border-"..border);
end
if ( emblem ~= -1 ) then
_G[standard.."Emblem"]:SetTexture("Interface\\PVPFrame\\Icons\\PVP-Banner-Emblem-"..emblem);
end
-- Set visual elements
_G[data]:Show();
button:SetAlpha(1);
_G[buttonName.."Highlight"]:SetAlpha(1);
_G[buttonName.."Highlight"]:SetBackdropBorderColor(1.0, 0.82, 0);
_G[standard]:SetAlpha(1);
_G[standard.."Border"]:Show();
_G[standard.."Emblem"]:Show();
_G[buttonName.."Background"]:SetVertexColor(0, 0, 0);
_G[buttonName.."Background"]:SetAlpha(1);
_G[buttonName.."TeamType"]:Hide();
end
end
-- show unused teams
for index, value in pairs(ARENA_TEAMS) do
if ( not value.index ) then
-- Set button elements to variables
buttonIndex = buttonIndex + 1;
button = _G["InspectPVPTeam"..buttonIndex];
buttonName = "InspectPVPTeam"..buttonIndex;
data = buttonName.."Data";
-- Set standard type
_G[buttonName.."StandardBanner"]:SetTexture("Interface\\PVPFrame\\PVP-Banner-"..value.size);
-- Hide or Show items
button:SetAlpha(0.4);
_G[data]:Hide();
_G[buttonName.."Background"]:SetVertexColor(0, 0, 0);
_G[buttonName.."Standard"]:SetAlpha(0.1);
_G[buttonName.."StandardBorder"]:Hide();
_G[buttonName.."StandardEmblem"]:Hide();
_G[buttonName.."TeamType"]:SetFormattedText(PVP_TEAMSIZE, value.size, value.size);
_G[buttonName.."TeamType"]:Show();
end
end
end
-- PVP Honor Data
function InspectPVPHonor_Update()
local todayHK, todayHonor, yesterdayHK, yesterdayHonor, lifetimeHK, lifetimeRank = GetInspectHonorData();
-- Yesterday's values
InspectPVPHonorYesterdayKills:SetText(yesterdayHK);
InspectPVPHonorYesterdayHonor:SetText(yesterdayHonor);
-- Lifetime values
InspectPVPHonorLifetimeKills:SetText(lifetimeHK);
InspectPVPFrameHonorPoints:SetText("");
InspectPVPFrameArenaPoints:SetText("");
-- Hide Point Values
InspectPVPFrameHonorPoints:Hide();
InspectPVPFrameArenaPoints:Hide();
-- This session's values
InspectPVPHonorTodayKills:SetText(todayHK);
InspectPVPHonorTodayHonor:SetText(todayHonor);
InspectPVPHonorTodayHonor:SetHeight(14);
end
@@ -0,0 +1,479 @@
<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="InspectPVPFrame.lua"/>
<Include file="PVPFrameTemplates.xml"/>
<Frame name="InspectPVPFrame" setAllPoints="true" enableMouse="true" parent="InspectFrame" hidden="true" id="2">
<HitRectInsets>
<AbsInset left="0" right="30" top="0" bottom="75"/>
</HitRectInsets>
<Layers>
<Layer level="BACKGROUND">
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-TopLeft">
<Size>
<AbsDimension x="256" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="2" y="-1"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-TopRight">
<Size>
<AbsDimension x="128" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="258" y="-1"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-BottomLeft">
<Size>
<AbsDimension x="256" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="2" y="-257"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-BottomRight">
<Size>
<AbsDimension x="128" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="258" y="-257"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
</Layer>
<Layer level="BORDER">
<Texture name="InspectPVPFrameBackground" file="Interface\PVPFrame\UI-Character-PVP">
<Size>
<AbsDimension x="512" y="512"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="14" y="-36"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
</Layer>
</Layers>
<Frames>
<Frame name="InspectPVPFrameHonor" hidden="false">
<Size>
<AbsDimension x="300" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectPVPFrameBackground" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="118" y="-2"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentLabel" inherits="GameFontHighlightSmall" text="PVP_LABEL_HONOR">
<Anchors>
<Anchor point="LEFT" relativeTo="$parent">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="$parentPoints" inherits="GameFontNormal" justifyH="RIGHT">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentLabel" relativePoint="RIGHT">
<Offset>
<AbsDimension x="15" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<Texture name="$parentIcon">
<Size>
<AbsDimension x="28" y="28"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentPoints" relativePoint="RIGHT">
<Offset>
<AbsDimension x="4" y="-6"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnEnter>
GameTooltip_SetDefaultAnchor(GameTooltip, self);
GameTooltip:SetText(HONOR_POINTS, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
GameTooltip:AddLine(TOOLTIP_HONOR_POINTS, nil, nil, nil, 1);
GameTooltip:Show();
</OnEnter>
<OnLeave function="GameTooltip_Hide"/>
</Scripts>
</Frame>
<Frame name="InspectPVPFrameArena">
<Size>
<AbsDimension x="300" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectPVPFrameBackground" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="120" y="-95"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentLabel" inherits="GameFontHighlightSmall" text="PVP_LABEL_ARENA">
<Anchors>
<Anchor point="LEFT" relativeTo="$parent">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="$parentPoints" inherits="GameFontNormal" justifyH="RIGHT">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentLabel" relativePoint="RIGHT">
<Offset>
<AbsDimension x="15" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<Texture name="$parentIcon" file="Interface\PVPFrame\PVP-ArenaPoints-Icon">
<Size>
<AbsDimension x="17" y="15"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentPoints" relativePoint="RIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnEnter>
GameTooltip_SetDefaultAnchor(GameTooltip, self);
GameTooltip:SetText(ARENA_POINTS, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
GameTooltip:AddLine(TOOLTIP_ARENA_POINTS, nil, nil, nil, 1);
GameTooltip:Show();
</OnEnter>
<OnLeave function="GameTooltip_Hide"/>
</Scripts>
</Frame>
<!-- Individual -->
<Frame name="InspectPVPHonor">
<Size>
<AbsDimension x="300" y="100"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectPVPFrameBackground" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="15" y="-28"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentKillsLabel" inherits="GameFontDisableSmall" text="KILLS">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectPVPHonor">
<Offset>
<AbsDimension x="25" y="-24"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="$parentHonorLabel" inherits="GameFontDisableSmall" text="HONOR">
<Anchors>
<Anchor point="TOPRIGHT" relativeTo="$parentKillsLabel" relativePoint="BOTTOMRIGHT">
<Offset>
<AbsDimension x="0" y="-10"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<Texture name="InspectPVPFrameLine1" file="Interface\PVPFrame\UI-Character-PVP-Elements">
<Size>
<AbsDimension x="250" y="5"/>
</Size>
<Anchors>
<Anchor point="BOTTOMLEFT" relativeTo="$parentKillsLabel" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="-10" y="4"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0" right="0.4140625" top="0.76171875" bottom="0.765625"/>
</Texture>
<!-- Today Begin -->
<FontString name="$parentTodayLabel" inherits="GameFontDisableSmall" text="HONOR_TODAY">
<Anchors>
<Anchor point="BOTTOMLEFT" relativeTo="$parentKillsLabel" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="30" y="10"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="$parentTodayKills" inherits="GameFontHighlightSmall">
<Anchors>
<Anchor point="TOP" relativeTo="$parentTodayLabel" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-10"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="$parentTodayHonor" inherits="GameFontHighlightSmall">
<Anchors>
<Anchor point="TOP" relativeTo="$parentTodayKills" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-10"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<!-- Today End -->
<!-- Yesterday Begin -->
<FontString name="$parentYesterdayLabel" inherits="GameFontDisableSmall" text="HONOR_YESTERDAY">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentTodayLabel" relativePoint="RIGHT">
<Offset>
<AbsDimension x="30" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="$parentYesterdayKills" inherits="GameFontHighlightSmall">
<Anchors>
<Anchor point="TOP" relativeTo="$parentYesterdayLabel" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-10"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="$parentYesterdayHonor" inherits="GameFontHighlightSmall" >
<Anchors>
<Anchor point="TOP" relativeTo="$parentYesterdayKills" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-10"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<!-- Yesterday End -->
<!-- Lifetime Begin -->
<FontString name="$parentLifetimeLabel" inherits="GameFontDisableSmall" text="HONOR_LIFETIME">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentYesterdayLabel" relativePoint="RIGHT">
<Offset>
<AbsDimension x="30" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="$parentLifetimeKills" inherits="GameFontHighlightSmall">
<Anchors>
<Anchor point="TOP" relativeTo="$parentLifetimeLabel" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-10"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="$parentLifetimeHonor" inherits="GameFontDisableSmall" text="-">
<Anchors>
<Anchor point="TOP" relativeTo="$parentLifetimeKills" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-10"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<!-- Lifetime End -->
</Layer>
</Layers>
</Frame>
<!-- Arena Teams -->
<Frame name="InspectPVPTeam1Standard" inherits="PVPTeamStandardTemplate">
<Anchors>
<Anchor point="LEFT" relativeTo="InspectPVPFrameBackground">
<Offset>
<AbsDimension x="16" y="85"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Button name="InspectPVPTeam1" inherits="PVPTeamBorderTemplate" id="1">
<Anchors>
<Anchor point="LEFT" relativeTo="InspectPVPTeam1Standard">
<Offset>
<AbsDimension x="33" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentTeamType" inherits="GameFontDisableLarge" hidden="true">
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="-8" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<Frame name="$parentData" inherits="PVPTeamDataTemplate" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>
</Frame>
</Frames>
<Scripts>
<OnClick>
</OnClick>
<OnEnter>
</OnEnter>
<OnLeave>
</OnLeave>
<OnMouseUp>
</OnMouseUp>
<OnMouseDown>
</OnMouseDown>
</Scripts>
</Button>
<Frame name="InspectPVPTeam2Standard" inherits="PVPTeamStandardTemplate">
<Anchors>
<Anchor point="LEFT" relativeTo="InspectPVPFrameBackground">
<Offset>
<AbsDimension x="16" y="0"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Button name="InspectPVPTeam2" inherits="PVPTeamBorderTemplate" id="2">
<Anchors>
<Anchor point="LEFT" relativeTo="InspectPVPTeam2Standard">
<Offset>
<AbsDimension x="33" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentTeamType" inherits="GameFontDisableLarge" hidden="true">
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="-8" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<Frame name="$parentData" inherits="PVPTeamDataTemplate" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>
</Frame>
</Frames>
<Scripts>
<OnClick>
</OnClick>
<OnEnter>
</OnEnter>
<OnLeave>
</OnLeave>
<OnMouseUp>
</OnMouseUp>
<OnMouseDown>
</OnMouseDown>
</Scripts>
</Button>
<Frame name="InspectPVPTeam3Standard" inherits="PVPTeamStandardTemplate">
<Anchors>
<Anchor point="LEFT" relativeTo="InspectPVPFrameBackground">
<Offset>
<AbsDimension x="16" y="-85"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Button name="InspectPVPTeam3" inherits="PVPTeamBorderTemplate" id="3">
<Anchors>
<Anchor point="LEFT" relativeTo="InspectPVPTeam3Standard">
<Offset>
<AbsDimension x="33" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentTeamType" inherits="GameFontDisableLarge" hidden="true">
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="-8" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<Frame name="$parentData" inherits="PVPTeamDataTemplate" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>
</Frame>
</Frames>
<Scripts>
<OnClick>
</OnClick>
<OnEnter>
</OnEnter>
<OnLeave>
</OnLeave>
<OnMouseUp>
</OnMouseUp>
<OnMouseDown>
</OnMouseDown>
</Scripts>
</Button>
</Frames>
<Scripts>
<OnLoad function="InspectPVPFrame_OnLoad"/>
<OnShow function="InspectPVPFrame_OnShow"/>
<OnEvent function="InspectPVPFrame_OnEvent"/>
</Scripts>
</Frame>
</Ui>
@@ -0,0 +1,148 @@
function InspectPaperDollFrame_OnLoad(self)
self:RegisterEvent("UNIT_MODEL_CHANGED");
self:RegisterEvent("UNIT_LEVEL");
end
function InspectModelFrame_OnUpdate(self, elapsedTime)
if ( InspectModelRotateLeftButton:GetButtonState() == "PUSHED" ) then
self.rotation = self.rotation + (elapsedTime * 2 * PI * ROTATIONS_PER_SECOND);
if ( self.rotation < 0 ) then
self.rotation = self.rotation + (2 * PI);
end
InspectModelFrame:SetRotation(self.rotation);
end
if ( InspectModelRotateRightButton:GetButtonState() == "PUSHED" ) then
self.rotation = self.rotation - (elapsedTime * 2 * PI * ROTATIONS_PER_SECOND);
if ( self.rotation > (2 * PI) ) then
self.rotation = self.rotation - (2 * PI);
end
InspectModelFrame:SetRotation(self.rotation);
end
end
function InspectModelFrame_OnLoad(self)
self.rotation = 0.61;
InspectModelFrame:SetRotation(self.rotation);
self:RegisterEvent("DISPLAY_SIZE_CHANGED");
end
function InspectModelRotateLeftButton_OnClick()
InspectModelFrame.rotation = InspectModelFrame.rotation - 0.03;
InspectModelFrame:SetRotation(InspectModelFrame.rotation);
PlaySound("igInventoryRotateCharacter");
end
function InspectModelRotateRightButton_OnClick()
InspectModelFrame.rotation = InspectModelFrame.rotation + 0.03;
InspectModelFrame:SetRotation(InspectModelFrame.rotation);
PlaySound("igInventoryRotateCharacter");
end
function InspectPaperDollFrame_OnEvent(self, event, unit)
if ( unit and unit == InspectFrame.unit ) then
if ( event == "UNIT_MODEL_CHANGED" ) then
InspectModelFrame:RefreshUnit();
elseif ( event == "UNIT_LEVEL" ) then
InspectPaperDollFrame_SetLevel();
end
return;
end
end
function InspectPaperDollFrame_SetLevel()
local unit, level = InspectFrame.unit, UnitLevel(InspectFrame.unit);
if ( level == -1 ) then
level = "??";
end
InspectLevelText:SetFormattedText(PLAYER_LEVEL,level, UnitRace(unit), UnitClass(unit));
end
function InspectPaperDollFrame_OnShow()
InspectModelFrame:SetUnit(InspectFrame.unit);
InspectPaperDollFrame_SetLevel();
InspectPaperDollItemSlotButton_Update(InspectHeadSlot);
InspectPaperDollItemSlotButton_Update(InspectNeckSlot);
InspectPaperDollItemSlotButton_Update(InspectShoulderSlot);
InspectPaperDollItemSlotButton_Update(InspectBackSlot);
InspectPaperDollItemSlotButton_Update(InspectChestSlot);
InspectPaperDollItemSlotButton_Update(InspectShirtSlot);
InspectPaperDollItemSlotButton_Update(InspectTabardSlot);
InspectPaperDollItemSlotButton_Update(InspectWristSlot);
InspectPaperDollItemSlotButton_Update(InspectHandsSlot);
InspectPaperDollItemSlotButton_Update(InspectWaistSlot);
InspectPaperDollItemSlotButton_Update(InspectLegsSlot);
InspectPaperDollItemSlotButton_Update(InspectFeetSlot);
InspectPaperDollItemSlotButton_Update(InspectFinger0Slot);
InspectPaperDollItemSlotButton_Update(InspectFinger1Slot);
InspectPaperDollItemSlotButton_Update(InspectTrinket0Slot);
InspectPaperDollItemSlotButton_Update(InspectTrinket1Slot);
InspectPaperDollItemSlotButton_Update(InspectMainHandSlot);
InspectPaperDollItemSlotButton_Update(InspectSecondaryHandSlot);
InspectPaperDollItemSlotButton_Update(InspectRangedSlot);
end
function InspectPaperDollItemSlotButton_OnLoad(self)
self:RegisterEvent("UNIT_INVENTORY_CHANGED");
local slotName = self:GetName();
local id;
local textureName;
local checkRelic;
id, textureName, checkRelic = GetInventorySlotInfo(strsub(slotName,8));
self:SetID(id);
local texture = _G[slotName.."IconTexture"];
texture:SetTexture(textureName);
self.backgroundTextureName = textureName;
self.checkRelic = checkRelic;
end
function InspectPaperDollItemSlotButton_OnEvent(self, event, ...)
if ( event == "UNIT_INVENTORY_CHANGED" ) then
local arg1 = ...;
if ( arg1 == InspectFrame.unit ) then
InspectPaperDollItemSlotButton_Update(self);
end
return;
end
end
function InspectPaperDollItemSlotButton_OnEnter(self)
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
if ( not GameTooltip:SetInventoryItem(InspectFrame.unit, self:GetID()) ) then
local text = _G[strupper(strsub(self:GetName(), 8))];
if ( self.checkRelic and UnitHasRelicSlot(InspectFrame.unit) ) then
text = _G["RELICSLOT"];
end
GameTooltip:SetText(text);
end
CursorUpdate(self);
end
function InspectPaperDollItemSlotButton_Update(button)
local unit = InspectFrame.unit;
local textureName = GetInventoryItemTexture(unit, button:GetID());
if ( textureName ) then
SetItemButtonTexture(button, textureName);
SetItemButtonCount(button, GetInventoryItemCount(unit, button:GetID()));
button.hasItem = 1;
else
local textureName = button.backgroundTextureName;
if ( button.checkRelic and UnitHasRelicSlot(unit) ) then
textureName = "Interface\\Paperdoll\\UI-PaperDoll-Slot-Relic.blp";
end
SetItemButtonTexture(button, textureName);
SetItemButtonCount(button, 0);
button.hasItem = nil;
end
if ( GameTooltip:IsOwned(button) ) then
if ( texture ) then
if ( not GameTooltip:SetInventoryItem(InspectFrame.unit, button:GetID()) ) then
GameTooltip:SetText(_G[strupper(strsub(button:GetName(), 8))]);
end
else
GameTooltip:Hide();
end
end
end
@@ -0,0 +1,352 @@
<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="InspectPaperDollFrame.lua"/>
<Button name="InspectPaperDollItemSlotButtonTemplate" inherits="ItemButtonTemplate" virtual="true">
<Scripts>
<OnLoad>
InspectPaperDollItemSlotButton_OnLoad(self);
</OnLoad>
<OnEvent>
InspectPaperDollItemSlotButton_OnEvent(self, event, ...);
</OnEvent>
<OnClick>
HandleModifiedItemClick(GetInventoryItemLink(InspectFrame.unit, self:GetID()));
</OnClick>
<OnUpdate>
CursorOnUpdate(self);
if ( GameTooltip:IsOwned(self) ) then
InspectPaperDollItemSlotButton_OnEnter(self);
end
</OnUpdate>
<OnEnter>
InspectPaperDollItemSlotButton_OnEnter(self, motion);
</OnEnter>
<OnLeave>
GameTooltip:Hide();
ResetCursor();
</OnLeave>
</Scripts>
<NormalTexture file="Interface\Buttons\UI-Quickslot2">
<Size>
<AbsDimension x="64" y="64"/>
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="0" y="-1"/>
</Offset>
</Anchor>
</Anchors>
</NormalTexture>
</Button>
<Frame name="InspectPaperDollFrame" setAllPoints="true" parent="InspectFrame" id="1">
<Layers>
<Layer level="BACKGROUND">
<Texture file="Interface\PaperDollInfoFrame\UI-Character-CharacterTab-L1">
<Size>
<AbsDimension x="256" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-CharacterTab-R1">
<Size>
<AbsDimension x="128" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="256" y="0"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-CharacterTab-BottomLeft">
<Size>
<AbsDimension x="256" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-256"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-CharacterTab-BottomRight">
<Size>
<AbsDimension x="128" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="256" y="-256"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<FontString name="InspectLevelText" inherits="GameFontNormalSmall" text="Level level race class">
<Anchors>
<Anchor point="TOP" relativeTo="InspectNameText" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-6"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="InspectTitleText" inherits="GameFontNormalSmall" text="title of the player" hidden="true">
<Anchors>
<Anchor point="TOP" relativeTo="InspectLevelText" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-1"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="InspectGuildText" inherits="GameFontNormalSmall" text="title of guild" hidden="true">
<Anchors>
<Anchor point="TOP" relativeTo="InspectTitleText" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-1"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<PlayerModel name="InspectModelFrame">
<Size>
<AbsDimension x="233" y="300"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="65" y="-78"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad function="InspectModelFrame_OnLoad"/>
<OnEvent>
self:RefreshUnit();
</OnEvent>
<OnUpdate function="InspectModelFrame_OnUpdate"/>
</Scripts>
<Frames>
<Button name="InspectModelRotateLeftButton">
<Size>
<AbsDimension x="35" y="35"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectModelFrame" relativePoint="TOPLEFT"/>
</Anchors>
<Scripts>
<OnLoad>
self:RegisterForClicks("LeftButtonDown", "LeftButtonUp");
</OnLoad>
<OnClick function="InspectModelRotateLeftButton_OnClick"/>
</Scripts>
<NormalTexture file="Interface\Buttons\UI-RotationLeft-Button-Up"/>
<PushedTexture file="Interface\Buttons\UI-RotationLeft-Button-Down"/>
<HighlightTexture file="Interface\Buttons\ButtonHilight-Round" alphaMode="ADD"/>
</Button>
<Button name="InspectModelRotateRightButton">
<Size>
<AbsDimension x="35" y="35"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectModelRotateLeftButton" relativePoint="TOPRIGHT"/>
</Anchors>
<Scripts>
<OnLoad>
self:RegisterForClicks("LeftButtonDown", "LeftButtonUp");
</OnLoad>
<OnClick function="InspectModelRotateRightButton_OnClick"/>
</Scripts>
<NormalTexture file="Interface\Buttons\UI-RotationRight-Button-Up"/>
<PushedTexture file="Interface\Buttons\UI-RotationRight-Button-Down"/>
<HighlightTexture file="Interface\Buttons\ButtonHilight-Round" alphaMode="ADD"/>
</Button>
</Frames>
</PlayerModel>
<Button name="InspectHeadSlot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="21" y="-74"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectNeckSlot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHeadSlot" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectShoulderSlot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectNeckSlot" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectBackSlot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectShoulderSlot" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectChestSlot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectBackSlot" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectShirtSlot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectChestSlot" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectTabardSlot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectShirtSlot" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectWristSlot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectTabardSlot" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectHandsSlot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="305" y="-74"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectWaistSlot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectHandsSlot" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectLegsSlot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectWaistSlot" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectFeetSlot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectLegsSlot" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectFinger0Slot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectFeetSlot" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectFinger1Slot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectFinger0Slot" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectTrinket0Slot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectFinger1Slot" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectTrinket1Slot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectTrinket0Slot" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-4"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectMainHandSlot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="122" y="127"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectSecondaryHandSlot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectMainHandSlot" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="InspectRangedSlot" inherits="InspectPaperDollItemSlotButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectSecondaryHandSlot" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
</Button>
</Frames>
<Scripts>
<OnLoad function="InspectPaperDollFrame_OnLoad"/>
<OnEvent function="InspectPaperDollFrame_OnEvent"/>
<OnShow function="InspectPaperDollFrame_OnShow"/>
</Scripts>
</Frame>
</Ui>
@@ -0,0 +1,151 @@
local talentSpecInfoCache = {};
function InspectTalentFrameTalent_OnClick(self, button)
if ( IsModifiedClick("CHATLINK") ) then
local link = GetTalentLink(PanelTemplates_GetSelectedTab(InspectTalentFrame), self:GetID(),
InspectTalentFrame.inspect, InspectTalentFrame.pet, InspectTalentFrame.talentGroup);
if ( link ) then
ChatEdit_InsertLink(link);
end
end
end
function InspectTalentFrameTalent_OnEvent(self, event, ...)
if ( GameTooltip:IsOwned(self) ) then
GameTooltip:SetTalent(PanelTemplates_GetSelectedTab(InspectTalentFrame), self:GetID(),
InspectTalentFrame.inspect, InspectTalentFrame.pet, InspectTalentFrame.talentGroup);
end
end
function InspectTalentFrameTalent_OnEnter(self)
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetTalent(PanelTemplates_GetSelectedTab(InspectTalentFrame), self:GetID(),
InspectTalentFrame.inspect, InspectTalentFrame.pet, InspectTalentFrame.talentGroup);
end
function InspectTalentFrame_UpdateTabs()
local numTabs = GetNumTalentTabs(InspectTalentFrame.inspect, InspectTalentFrame.pet);
local selectedTab = PanelTemplates_GetSelectedTab(InspectTalentFrame);
local tab;
for i = 1, MAX_TALENT_TABS do
tab = _G["InspectTalentFrameTab"..i];
if ( tab ) then
talentSpecInfoCache[i] = talentSpecInfoCache[i] or { };
if ( i <= numTabs ) then
local name, icon, pointsSpent, background, previewPointsSpent = GetTalentTabInfo(i, InspectTalentFrame.inspect, InspectTalentFrame.pet, InspectTalentFrame.talentGroup);
if ( i == selectedTab ) then
-- If tab is the selected tab set the points spent info
local displayPointsSpent = pointsSpent + previewPointsSpent;
InspectTalentFrameSpentPointsText:SetFormattedText(MASTERY_POINTS_SPENT, name, HIGHLIGHT_FONT_COLOR_CODE..displayPointsSpent..FONT_COLOR_CODE_CLOSE);
InspectTalentFrame.pointsSpent = pointsSpent;
InspectTalentFrame.previewPointsSpent = previewPointsSpent;
end
tab:SetText(name);
PanelTemplates_TabResize(tab, -10);
tab:Show();
else
tab:Hide();
talentSpecInfoCache[i].name = nil;
end
end
end
end
function InspectTalentFrame_Update()
-- update spec info first
TalentFrame_UpdateSpecInfoCache(talentSpecInfoCache, InspectTalentFrame.inspect, InspectTalentFrame.pet, InspectTalentFrame.talentGroup);
-- update tabs
-- select a tab if one is not already selected
if ( not PanelTemplates_GetSelectedTab(InspectTalentFrame) ) then
-- if there is a primary tab then we'll prefer that one
if ( talentSpecInfoCache.primaryTabIndex > 0 ) then
PanelTemplates_SetTab(InspectTalentFrame, talentSpecInfoCache.primaryTabIndex);
else
PanelTemplates_SetTab(InspectTalentFrame, DEFAULT_TALENT_TAB);
end
end
InspectTalentFrame_UpdateTabs();
-- update parent tabs
PanelTemplates_UpdateTabs(InspectFrame);
end
function InspectTalentFrame_Refresh()
InspectTalentFrame.talentGroup = GetActiveTalentGroup(InspectTalentFrame.inspect);
InspectTalentFrame.unit = InspectFrame.unit;
TalentFrame_Update(InspectTalentFrame);
end
function InspectTalentFrame_OnLoad(self)
self.updateFunction = InspectTalentFrame_Update;
self.inspect = true;
self.pet = false;
self.talentGroup = 1;
TalentFrame_Load(self);
local button;
for i = 1, MAX_NUM_TALENTS do
button = _G["InspectTalentFrameTalent"..i];
if ( button ) then
button:SetScript("OnClick", InspectTalentFrameTalent_OnClick);
button:SetScript("OnEvent", InspectTalentFrameTalent_OnEvent);
button:SetScript("OnEnter", InspectTalentFrameTalent_OnEnter);
end
end
-- setup tabs
PanelTemplates_SetNumTabs(self, MAX_TALENT_TABS);
PanelTemplates_UpdateTabs(self);
end
function InspectTalentFrame_OnShow()
InspectTalentFrame:RegisterEvent("INSPECT_TALENT_READY");
InspectTalentFrame_Refresh();
end
function InspectTalentFrame_OnHide()
InspectTalentFrame:UnregisterEvent("INSPECT_TALENT_READY");
wipe(talentSpecInfoCache);
end
function InspectTalentFrame_OnEvent(self, event, ...)
if ( event == "INSPECT_TALENT_READY" ) then
InspectTalentFrame_Refresh();
end
end
function InspectTalentFrameDownArrow_OnClick(self)
local parent = self:GetParent();
parent:SetValue(parent:GetValue() + (parent:GetHeight() / 2));
PlaySound("UChatScrollButton");
UIFrameFlashStop(InspectTalentFrameScrollButtonOverlay);
end
function InspectTalentFramePointsBar_OnEnter(self)
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:AddLine(TALENT_POINTS);
local pointsColor;
for index, info in ipairs(talentSpecInfoCache) do
if ( info.name ) then
if ( talentSpecInfoCache.primaryTabIndex == index ) then
pointsColor = GREEN_FONT_COLOR;
else
pointsColor = HIGHLIGHT_FONT_COLOR;
end
GameTooltip:AddDoubleLine(
info.name,
info.pointsSpent,
HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b,
pointsColor.r, pointsColor.g, pointsColor.b,
1
);
end
end
GameTooltip:Show();
end
@@ -0,0 +1,453 @@
<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="InspectTalentFrame.lua"/>
<Frame name="InspectTalentFrame" setAllPoints="true" enableMouse="true" parent="InspectFrame" hidden="true" id="4">
<HitRectInsets>
<AbsInset left="0" right="30" top="0" bottom="45"/>
</HitRectInsets>
<Layers>
<Layer level="BACKGROUND">
<Texture name="InspectTalentFramePortrait">
<Size>
<AbsDimension x="60" y="60"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="7" y="-6"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
</Layer>
<Layer level="BORDER">
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-TopLeft">
<Size>
<AbsDimension x="256" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="2" y="-1"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-TopRight">
<Size>
<AbsDimension x="128" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="2" y="-1"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-BottomLeft">
<Size>
<AbsDimension x="256" y="256"/>
</Size>
<Anchors>
<Anchor point="BOTTOMLEFT">
<Offset>
<AbsDimension x="2" y="-1"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-BottomRight">
<Size>
<AbsDimension x="128" y="256"/>
</Size>
<Anchors>
<Anchor point="BOTTOMRIGHT">
<Offset>
<AbsDimension x="2" y="-1"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
</Layer>
<Layer level="ARTWORK">
<Texture name="InspectTalentFrameBackgroundTopLeft">
<Size>
<AbsDimension x="256" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="23" y="-77"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture name="InspectTalentFrameBackgroundTopRight">
<Size>
<AbsDimension x="64" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectTalentFrameBackgroundTopLeft" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture name="InspectTalentFrameBackgroundBottomLeft">
<Size>
<AbsDimension x="256" y="128"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectTalentFrameBackgroundTopLeft" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<Texture name="InspectTalentFrameBackgroundBottomRight">
<Size>
<AbsDimension x="64" y="128"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="InspectTalentFrameBackgroundTopLeft" relativePoint="BOTTOMRIGHT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
</Layer>
</Layers>
<Frames>
<Button name="$parentTab1" inherits="TabButtonTemplate" text="OK" id="1">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="70" y="-40"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
PanelTemplates_Tab_OnClick(self, InspectTalentFrame);
InspectTalentFrame_Update();
TalentFrame_Update(InspectTalentFrame);
PlaySound("igMainMenuOptionCheckBoxOn");
</OnClick>
</Scripts>
</Button>
<Button name="$parentTab2" inherits="TabButtonTemplate" text="OK" id="2">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentTab1" relativePoint="RIGHT"/>
</Anchors>
<Scripts>
<OnClick>
PanelTemplates_Tab_OnClick(self, InspectTalentFrame);
InspectTalentFrame_Update();
TalentFrame_Update(InspectTalentFrame);
PlaySound("igMainMenuOptionCheckBoxOn");
</OnClick>
</Scripts>
</Button>
<Button name="$parentTab3" inherits="TabButtonTemplate" text="OK" id="3">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentTab2" relativePoint="RIGHT"/>
</Anchors>
<Scripts>
<OnClick>
PanelTemplates_Tab_OnClick(self, InspectTalentFrame);
InspectTalentFrame_Update();
TalentFrame_Update(InspectTalentFrame);
PlaySound("igMainMenuOptionCheckBoxOn");
</OnClick>
</Scripts>
</Button>
<Button name="InspectTalentFrameCloseButton" inherits="UIPanelCloseButton">
<Anchors>
<Anchor point="CENTER" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="-44" y="-25"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Frame name="InspectTalentFramePointsBar">
<Size x="331" y="26"/>
<Anchors>
<Anchor point="LEFT">
<Offset x="16" y="0"/>
</Anchor>
<Anchor point="RIGHT">
<Offset x="-36" y="0"/>
</Anchor>
<Anchor point="BOTTOM">
<Offset x="0" y="81"/>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentBackground" file="Interface\Buttons\UI-Button-Borders2" setAllPoints="true">
<Size x="331" y="26"/>
<TexCoords left="0.0" right="0.646484375" top="0.2109375" bottom="0.4140625"/>
</Texture>
</Layer>
<Layer level="BORDER">
<Texture name="$parentBorderLeft" file="Interface\Buttons\UI-Button-Borders2">
<Size x="6" y="18"/>
<Anchors>
<Anchor point="LEFT">
<Offset x="4" y="0"/>
</Anchor>
<Anchor point="TOP">
<Offset x="0" y="-5"/>
</Anchor>
<Anchor point="BOTTOM">
<Offset x="0" y="5"/>
</Anchor>
</Anchors>
<TexCoords left="0.0" right="0.01171875" top="0.421875" bottom="0.5625"/>
</Texture>
<Texture name="$parentBorderRight" file="Interface\Buttons\UI-Button-Borders2">
<Size x="6" y="18"/>
<Anchors>
<Anchor point="RIGHT">
<Offset x="-4" y="0"/>
</Anchor>
<Anchor point="TOP">
<Offset x="0" y="-5"/>
</Anchor>
<Anchor point="BOTTOM">
<Offset x="0" y="5"/>
</Anchor>
</Anchors>
<TexCoords left="0.3046875" right="0.31640625" top="0.421875" bottom="0.5625"/>
</Texture>
<Texture name="$parentBorderMiddle" file="Interface\Buttons\UI-Button-Borders2">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentBorderLeft" relativePoint="TOPRIGHT"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentBorderRight" relativePoint="BOTTOMLEFT"/>
</Anchors>
<TexCoords left="0.01171875" right="0.3046875" top="0.421875" bottom="0.5625"/>
</Texture>
</Layer>
<Layer level="ARTWORK">
<FontString name="InspectTalentFrameSpentPointsText" inherits="GameFontNormalSmall" justifyH="LEFT">
<Size x="0" y="15"/>
<Anchors>
<Anchor point="LEFT">
<Offset x="12" y="1"/>
</Anchor>
</Anchors>
</FontString>
<FontString name="InspectTalentFrameTalentPointsText" inherits="GameFontNormalSmall" justifyH="RIGHT">
<Size x="0" y="15"/>
<Anchors>
<Anchor point="RIGHT">
<Offset x="-12" y="1"/>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnEnter function="InspectTalentFramePointsBar_OnEnter"/>
<OnLeave function="GameTooltip_Hide"/>
</Scripts>
</Frame>
<ScrollFrame name="InspectTalentFrameScrollFrame" inherits="UIPanelScrollFrameTemplate">
<Size>
<AbsDimension x="296" y="332"/>
</Size>
<Anchors>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-65" y="-77"/>
</Offset>
</Anchor>
<Anchor point="BOTTOM" relativeTo="InspectTalentFramePointsBar" relativePoint="TOP">
<Offset x="0" y="0"/>
</Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<Texture file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
<Size>
<AbsDimension x="31" y="256"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="-2" y="5"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0" right="0.484375" top="0" bottom="1.0"/>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
<Size>
<AbsDimension x="31" y="106"/>
</Size>
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT">
<Offset>
<AbsDimension x="-2" y="-2"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0.515625" right="1.0" top="0" bottom="0.4140625"/>
</Texture>
</Layer>
</Layers>
<ScrollChild>
<Frame name="InspectTalentFrameScrollChildFrame">
<Size>
<AbsDimension x="320" y="50"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture name="InspectTalentFrameBranch1" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch2" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch3" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch4" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch5" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch6" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch7" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch8" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch9" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch10" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch11" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch12" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch13" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch14" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch15" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch16" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch17" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch18" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch19" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch20" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch21" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch22" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch23" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch24" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch25" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch26" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch27" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch28" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch29" inherits="TalentBranchTemplate"/>
<Texture name="InspectTalentFrameBranch30" inherits="TalentBranchTemplate"/>
</Layer>
</Layers>
<Frames>
<Button name="InspectTalentFrameTalent1" inherits="TalentButtonTemplate" id="1"/>
<Button name="InspectTalentFrameTalent2" inherits="TalentButtonTemplate" id="2"/>
<Button name="InspectTalentFrameTalent3" inherits="TalentButtonTemplate" id="3"/>
<Button name="InspectTalentFrameTalent4" inherits="TalentButtonTemplate" id="4"/>
<Button name="InspectTalentFrameTalent5" inherits="TalentButtonTemplate" id="5"/>
<Button name="InspectTalentFrameTalent6" inherits="TalentButtonTemplate" id="6"/>
<Button name="InspectTalentFrameTalent7" inherits="TalentButtonTemplate" id="7"/>
<Button name="InspectTalentFrameTalent8" inherits="TalentButtonTemplate" id="8"/>
<Button name="InspectTalentFrameTalent9" inherits="TalentButtonTemplate" id="9"/>
<Button name="InspectTalentFrameTalent10" inherits="TalentButtonTemplate" id="10"/>
<Button name="InspectTalentFrameTalent11" inherits="TalentButtonTemplate" id="11"/>
<Button name="InspectTalentFrameTalent12" inherits="TalentButtonTemplate" id="12"/>
<Button name="InspectTalentFrameTalent13" inherits="TalentButtonTemplate" id="13"/>
<Button name="InspectTalentFrameTalent14" inherits="TalentButtonTemplate" id="14"/>
<Button name="InspectTalentFrameTalent15" inherits="TalentButtonTemplate" id="15"/>
<Button name="InspectTalentFrameTalent16" inherits="TalentButtonTemplate" id="16"/>
<Button name="InspectTalentFrameTalent17" inherits="TalentButtonTemplate" id="17"/>
<Button name="InspectTalentFrameTalent18" inherits="TalentButtonTemplate" id="18"/>
<Button name="InspectTalentFrameTalent19" inherits="TalentButtonTemplate" id="19"/>
<Button name="InspectTalentFrameTalent20" inherits="TalentButtonTemplate" id="20"/>
<Button name="InspectTalentFrameTalent21" inherits="TalentButtonTemplate" id="21"/>
<Button name="InspectTalentFrameTalent22" inherits="TalentButtonTemplate" id="22"/>
<Button name="InspectTalentFrameTalent23" inherits="TalentButtonTemplate" id="23"/>
<Button name="InspectTalentFrameTalent24" inherits="TalentButtonTemplate" id="24"/>
<Button name="InspectTalentFrameTalent25" inherits="TalentButtonTemplate" id="25"/>
<Button name="InspectTalentFrameTalent26" inherits="TalentButtonTemplate" id="26"/>
<Button name="InspectTalentFrameTalent27" inherits="TalentButtonTemplate" id="27"/>
<Button name="InspectTalentFrameTalent28" inherits="TalentButtonTemplate" id="28"/>
<Button name="InspectTalentFrameTalent29" inherits="TalentButtonTemplate" id="29"/>
<Button name="InspectTalentFrameTalent30" inherits="TalentButtonTemplate" id="30"/>
<Button name="InspectTalentFrameTalent31" inherits="TalentButtonTemplate" id="31"/>
<Button name="InspectTalentFrameTalent32" inherits="TalentButtonTemplate" id="32"/>
<Button name="InspectTalentFrameTalent33" inherits="TalentButtonTemplate" id="33"/>
<Button name="InspectTalentFrameTalent34" inherits="TalentButtonTemplate" id="34"/>
<Button name="InspectTalentFrameTalent35" inherits="TalentButtonTemplate" id="35"/>
<Button name="InspectTalentFrameTalent36" inherits="TalentButtonTemplate" id="36"/>
<Button name="InspectTalentFrameTalent37" inherits="TalentButtonTemplate" id="37"/>
<Button name="InspectTalentFrameTalent38" inherits="TalentButtonTemplate" id="38"/>
<Button name="InspectTalentFrameTalent39" inherits="TalentButtonTemplate" id="39"/>
<Button name="InspectTalentFrameTalent40" inherits="TalentButtonTemplate" id="40"/>
<Frame name="InspectTalentFrameArrowFrame" setAllPoints="true">
<Layers>
<Layer level="OVERLAY">
<Texture name="InspectTalentFrameArrow1" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow2" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow3" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow4" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow5" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow6" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow7" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow8" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow9" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow10" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow11" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow12" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow13" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow14" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow15" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow16" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow17" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow18" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow19" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow20" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow21" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow22" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow23" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow24" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow25" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow26" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow27" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow28" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow29" inherits="TalentArrowTemplate"/>
<Texture name="InspectTalentFrameArrow30" inherits="TalentArrowTemplate"/>
</Layer>
</Layers>
</Frame>
</Frames>
</Frame>
</ScrollChild>
</ScrollFrame>
<Frame name="InspectTalentFrameScrollButtonOverlay" parent="InspectTalentFrameScrollFrameScrollBarScrollDownButton" hidden="true">
<Size>
<AbsDimension x="32" y="32"/>
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<Texture file="Interface\Buttons\UI-ScrollBar-Button-Overlay" setAllPoints="true" alphaMode="ADD"/>
</Layer>
</Layers>
</Frame>
</Frames>
<Scripts>
<OnShow function="InspectTalentFrame_OnShow"/>
<OnHide function="InspectTalentFrame_OnHide"/>
<OnLoad function="InspectTalentFrame_OnLoad"/>
<OnEvent function="InspectTalentFrame_OnEvent"/>
</Scripts>
</Frame>
</Ui>
@@ -0,0 +1 @@
-- This file is executed at the end of addon load