режим предателя + UI референсы и DragonUI
This commit is contained in:
@@ -0,0 +1,313 @@
|
||||
UIPanelWindows["TokenFrame"] = { area = "left", pushable = 1, whileDead = 1 };
|
||||
TOKEN_BUTTON_OFFSET = 3;
|
||||
MAX_WATCHED_TOKENS = 3;
|
||||
BACKPACK_TOKENFRAME_HEIGHT = 22;
|
||||
|
||||
-- REMOVE ME!!!
|
||||
SlashCmdList["TOKENUI"] = function() ToggleCharacter("TokenFrame"); end;
|
||||
|
||||
function TokenButton_OnLoad(self)
|
||||
local name = self:GetName();
|
||||
self.count = _G[name.."Count"];
|
||||
self.name = _G[name.."Name"];
|
||||
self.icon = _G[name.."Icon"];
|
||||
self.check = _G[name.."Check"];
|
||||
self.expandIcon = _G[name.."ExpandIcon"];
|
||||
self.categoryLeft = _G[name.."CategoryLeft"];
|
||||
self.categoryRight = _G[name.."CategoryRight"];
|
||||
self.highlight = _G[name.."Highlight"];
|
||||
self.stripe = _G[name.."Stripe"];
|
||||
end
|
||||
|
||||
function TokenFrame_OnLoad()
|
||||
TokenFrameContainerScrollBar.Show =
|
||||
function (self)
|
||||
TokenFrameContainer:SetWidth(299);
|
||||
for _, button in next, _G["TokenFrameContainer"].buttons do
|
||||
button:SetWidth(295);
|
||||
end
|
||||
getmetatable(self).__index.Show(self);
|
||||
end
|
||||
|
||||
TokenFrameContainerScrollBar.Hide =
|
||||
function (self)
|
||||
TokenFrameContainer:SetWidth(313);
|
||||
for _, button in next, TokenFrameContainer.buttons do
|
||||
button:SetWidth(313);
|
||||
end
|
||||
getmetatable(self).__index.Hide(self);
|
||||
end
|
||||
TokenFrameContainer.update = TokenFrame_Update;
|
||||
HybridScrollFrame_CreateButtons(TokenFrameContainer, "TokenButtonTemplate", 0, -2, "TOPLEFT", "TOPLEFT", 0, -TOKEN_BUTTON_OFFSET);
|
||||
local buttons = TokenFrameContainer.buttons;
|
||||
local numButtons = #buttons;
|
||||
for i=1, numButtons do
|
||||
if ( mod(i, 2) == 1 ) then
|
||||
buttons[i].stripe:Hide();
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function TokenFrame_OnShow(self)
|
||||
SetButtonPulse(CharacterFrameTab5, 0, 1); --Stop the button pulse
|
||||
TokenFrame_Update();
|
||||
end
|
||||
|
||||
function TokenFrame_Update()
|
||||
|
||||
-- Setup the buttons
|
||||
local scrollFrame = TokenFrameContainer;
|
||||
local offset = HybridScrollFrame_GetOffset(scrollFrame);
|
||||
local buttons = scrollFrame.buttons;
|
||||
local numButtons = #buttons;
|
||||
local numTokenTypes = GetCurrencyListSize();
|
||||
local name, isHeader, isExpanded, isUnused, isWatched, count, extraCurrencyType, icon, itemID;
|
||||
local button, index;
|
||||
for i=1, numButtons do
|
||||
index = offset+i;
|
||||
name, isHeader, isExpanded, isUnused, isWatched, count, extraCurrencyType, icon, itemID = GetCurrencyListInfo(index);
|
||||
|
||||
button = buttons[i];
|
||||
button.check:Hide();
|
||||
if ( not name or name == "" ) then
|
||||
button:Hide();
|
||||
else
|
||||
if ( isHeader ) then
|
||||
button.categoryLeft:Show();
|
||||
button.categoryRight:Show();
|
||||
button.expandIcon:Show();
|
||||
button.count:SetText("");
|
||||
button.icon:SetTexture("");
|
||||
if ( isExpanded ) then
|
||||
button.expandIcon:SetTexCoord(0.5625, 1, 0, 0.4375);
|
||||
else
|
||||
button.expandIcon:SetTexCoord(0, 0.4375, 0, 0.4375);
|
||||
end
|
||||
button.highlight:SetTexture("Interface\\TokenFrame\\UI-TokenFrame-CategoryButton");
|
||||
button.highlight:SetPoint("TOPLEFT", button, "TOPLEFT", 3, -2);
|
||||
button.highlight:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -3, 2);
|
||||
button:SetText(name);
|
||||
button.name:SetText("");
|
||||
button.itemID = nil;
|
||||
button.LinkButton:Hide();
|
||||
else
|
||||
button.categoryLeft:Hide();
|
||||
button.categoryRight:Hide();
|
||||
button.expandIcon:Hide();
|
||||
button.count:SetText(count);
|
||||
button.extraCurrencyType = extraCurrencyType;
|
||||
if ( extraCurrencyType == 1 ) then --Arena points
|
||||
button.icon:SetTexture("Interface\\PVPFrame\\PVP-ArenaPoints-Icon");
|
||||
button.icon:SetTexCoord(0, 1, 0, 1);
|
||||
elseif ( extraCurrencyType == 2 ) then --Honor points
|
||||
local factionGroup = UnitFactionGroup("player");
|
||||
if ( factionGroup ) then
|
||||
button.icon:SetTexture("Interface\\TargetingFrame\\UI-PVP-"..factionGroup);
|
||||
button.icon:SetTexCoord( 0.03125, 0.59375, 0.03125, 0.59375 );
|
||||
else
|
||||
button.icon:Hide() --We don't know their faction yet!
|
||||
button.icon:SetTexCoord(0, 1, 0, 1);
|
||||
end
|
||||
else
|
||||
button.icon:SetTexture(icon);
|
||||
button.icon:SetTexCoord(0, 1, 0, 1);
|
||||
end
|
||||
if ( isWatched ) then
|
||||
button.check:Show();
|
||||
end
|
||||
button.highlight:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight");
|
||||
button.highlight:SetPoint("TOPLEFT", button, "TOPLEFT", 0, 0);
|
||||
button.highlight:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", 0, 0);
|
||||
--Gray out the text if the count is 0
|
||||
if ( count == 0 ) then
|
||||
button.count:SetFontObject("GameFontDisable");
|
||||
button.name:SetFontObject("GameFontDisable");
|
||||
else
|
||||
button.count:SetFontObject("GameFontHighlight");
|
||||
button.name:SetFontObject("GameFontHighlight");
|
||||
end
|
||||
button:SetText("");
|
||||
button.name:SetText(name);
|
||||
button.itemID = itemID;
|
||||
button.LinkButton:Show();
|
||||
end
|
||||
--Manage highlight
|
||||
if ( name == TokenFrame.selectedToken ) then
|
||||
TokenFrame.selectedID = index;
|
||||
button:LockHighlight();
|
||||
else
|
||||
button:UnlockHighlight();
|
||||
end
|
||||
|
||||
button.index = index;
|
||||
button.isHeader = isHeader;
|
||||
button.isExpanded = isExpanded;
|
||||
button.isUnused = isUnused;
|
||||
button.isWatched = isWatched;
|
||||
button:Show();
|
||||
end
|
||||
end
|
||||
local totalHeight = numTokenTypes * (button:GetHeight()+TOKEN_BUTTON_OFFSET);
|
||||
local displayedHeight = #buttons * (button:GetHeight()+TOKEN_BUTTON_OFFSET);
|
||||
|
||||
HybridScrollFrame_Update(scrollFrame, totalHeight, displayedHeight);
|
||||
|
||||
if ( numTokenTypes == 0 ) then
|
||||
CharacterFrameTab5:Hide();
|
||||
else
|
||||
CharacterFrameTab5:Show();
|
||||
end
|
||||
end
|
||||
|
||||
function TokenFramePopup_CloseIfHidden()
|
||||
-- This handles the case where you close a category with the selected token popup shown
|
||||
local numTokenTypes = GetCurrencyListSize();
|
||||
local selectedFound;
|
||||
for i=1, numTokenTypes do
|
||||
if ( TokenFrame.selectedToken == GetCurrencyListInfo(i) ) then
|
||||
selectedFound = 1;
|
||||
end
|
||||
end
|
||||
if ( not selectedFound ) then
|
||||
TokenFramePopup:Hide();
|
||||
end
|
||||
end
|
||||
|
||||
function BackpackTokenFrame_Update()
|
||||
local watchButton;
|
||||
local name, count, extraCurrencyType, icon;
|
||||
for i=1, MAX_WATCHED_TOKENS do
|
||||
name, count, extraCurrencyType, icon, itemID = GetBackpackCurrencyInfo(i);
|
||||
-- Update watched tokens
|
||||
if ( name ) then
|
||||
watchButton = _G["BackpackTokenFrameToken"..i];
|
||||
watchButton.extraCurrencyType = extraCurrencyType;
|
||||
if ( extraCurrencyType == 1 ) then --Arena points
|
||||
watchButton.icon:SetTexture("Interface\\PVPFrame\\PVP-ArenaPoints-Icon");
|
||||
watchButton.icon:SetTexCoord(0, 1, 0, 1);
|
||||
elseif ( extraCurrencyType == 2 ) then --Honor points
|
||||
local factionGroup = UnitFactionGroup("player");
|
||||
if ( factionGroup ) then
|
||||
watchButton.icon:SetTexture("Interface\\TargetingFrame\\UI-PVP-"..factionGroup);
|
||||
watchButton.icon:SetTexCoord( 0.03125, 0.59375, 0.03125, 0.59375 );
|
||||
else
|
||||
watchButton.icon:SetTexCoord(0, 1, 0, 1);
|
||||
end
|
||||
else
|
||||
watchButton.icon:SetTexture(icon);
|
||||
watchButton.icon:SetTexCoord(0, 1, 0, 1);
|
||||
end
|
||||
if ( count <= 99999 ) then
|
||||
watchButton.count:SetText(count);
|
||||
else
|
||||
watchButton.count:SetText("*");
|
||||
end
|
||||
watchButton:Show();
|
||||
BackpackTokenFrame.shouldShow = 1;
|
||||
BackpackTokenFrame.numWatchedTokens = i;
|
||||
watchButton.itemID = itemID;
|
||||
else
|
||||
_G["BackpackTokenFrameToken"..i]:Hide();
|
||||
if ( i == 1 ) then
|
||||
BackpackTokenFrame.shouldShow = nil;
|
||||
end
|
||||
_G["BackpackTokenFrameToken"..i].itemID = nil;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function GetNumWatchedTokens()
|
||||
if ( not BackpackTokenFrame.numWatchedTokens ) then
|
||||
-- No count yet so get it
|
||||
BackpackTokenFrame_Update();
|
||||
end
|
||||
return BackpackTokenFrame.numWatchedTokens or 0;
|
||||
end
|
||||
|
||||
function BackpackTokenFrame_IsShown()
|
||||
return BackpackTokenFrame.shouldShow;
|
||||
end
|
||||
|
||||
function ManageBackpackTokenFrame(backpack)
|
||||
if ( not backpack ) then
|
||||
backpack = GetBackpackFrame();
|
||||
end
|
||||
if ( not backpack ) then
|
||||
-- If still no backpack then we don't show the frame
|
||||
BackpackTokenFrame:Hide();
|
||||
return;
|
||||
end
|
||||
if ( BackpackTokenFrame_IsShown() ) then
|
||||
BackpackTokenFrame:SetParent(backpack);
|
||||
BackpackTokenFrame:SetPoint("BOTTOMLEFT", backpack, "BOTTOMLEFT", 9, 0);
|
||||
backpack:SetHeight(BACKPACK_HEIGHT+BACKPACK_TOKENFRAME_HEIGHT);
|
||||
BackpackTokenFrame:Show();
|
||||
else
|
||||
backpack:SetHeight(BACKPACK_HEIGHT);
|
||||
BackpackTokenFrame:Hide();
|
||||
end
|
||||
end
|
||||
|
||||
function TokenButton_OnClick(self)
|
||||
if ( self.isHeader ) then
|
||||
if ( self.isExpanded ) then
|
||||
ExpandCurrencyList(self.index, 0);
|
||||
else
|
||||
ExpandCurrencyList(self.index, 1);
|
||||
end
|
||||
else
|
||||
TokenFrame.selectedToken = self.name:GetText();
|
||||
if ( IsModifiedClick("TOKENWATCHTOGGLE") ) then
|
||||
TokenFrame.selectedID = self.index;
|
||||
if ( self.isWatched ) then
|
||||
SetCurrencyBackpack(TokenFrame.selectedID, 0);
|
||||
self.isWatched = false;
|
||||
else
|
||||
-- Set an error message if trying to show too many quests
|
||||
if ( GetNumWatchedTokens() >= MAX_WATCHED_TOKENS ) then
|
||||
UIErrorsFrame:AddMessage(format(TOO_MANY_WATCHED_TOKENS, MAX_WATCHED_TOKENS), 1.0, 0.1, 0.1, 1.0);
|
||||
return;
|
||||
end
|
||||
SetCurrencyBackpack(TokenFrame.selectedID, 1);
|
||||
self.isWatched = true;
|
||||
end
|
||||
if ( TokenFrame.selectedID == self.index ) then
|
||||
TokenFrame_UpdatePopup(self);
|
||||
end
|
||||
BackpackTokenFrame_Update();
|
||||
ManageBackpackTokenFrame();
|
||||
else
|
||||
|
||||
if ( TokenFramePopup:IsShown() ) then
|
||||
if ( TokenFrame.selectedID == self.index ) then
|
||||
TokenFramePopup:Hide();
|
||||
else
|
||||
TokenFramePopup:Show();
|
||||
end
|
||||
else
|
||||
TokenFramePopup:Show();
|
||||
end
|
||||
TokenFrame.selectedID = self.index;
|
||||
TokenFrame_UpdatePopup(self);
|
||||
end
|
||||
end
|
||||
TokenFrame_Update();
|
||||
TokenFramePopup_CloseIfHidden();
|
||||
end
|
||||
|
||||
function TokenFrame_UpdatePopup(button)
|
||||
TokenFramePopupInactiveCheckBox:SetChecked(button.isUnused);
|
||||
TokenFramePopupBackpackCheckBox:SetChecked(button.isWatched);
|
||||
end
|
||||
|
||||
function TokenButtonLinkButton_OnClick(self, button)
|
||||
if ( IsModifiedClick("CHATLINK") ) then
|
||||
ChatEdit_InsertLink(select(2, GetItemInfo(self:GetParent().itemID)));
|
||||
end
|
||||
end
|
||||
|
||||
function BackpackTokenButton_OnClick(self, button)
|
||||
if ( IsModifiedClick("CHATLINK") ) then
|
||||
ChatEdit_InsertLink(select(2, GetItemInfo(self.itemID)));
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
## Interface: 30300
|
||||
## Title: Blizzard_TokenUI
|
||||
## Secure: 1
|
||||
Blizzard_TokenUI.lua
|
||||
Blizzard_TokenUI.xml
|
||||
Localization.lua
|
||||
@@ -0,0 +1,504 @@
|
||||
<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">
|
||||
<Button name="TokenButtonTemplate" virtual="true">
|
||||
<Size>
|
||||
<AbsDimension x="295" y="17"/>
|
||||
</Size>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<Texture name="$parentStripe" setAllPoints="true">
|
||||
<Color a=".08" r="1" g="1" b="1"/>
|
||||
</Texture>
|
||||
</Layer>
|
||||
<Layer level="BORDER">
|
||||
<Texture name="$parentIcon">
|
||||
<Size>
|
||||
<AbsDimension x="15" y="15"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT" >
|
||||
<Offset x="-20" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<FontString name="$parentCount" inherits="GameFontHighlightRight" text="100">
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT" relativeTo="$parentIcon" relativePoint="LEFT">
|
||||
<Offset x="-5" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="$parentName" inherits="GameFontHighlightLeft">
|
||||
<Size>
|
||||
<AbsDimension x="210" y="11"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset x="11" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<Texture name="$parentCheck" file="Interface\Buttons\UI-CheckBox-Check">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT">
|
||||
<Offset x="-3" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture name="$parentCategoryRight" file="Interface\TokenFrame\UI-TokenFrame-CategoryButton">
|
||||
<Size>
|
||||
<AbsDimension x="37" y="18"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT">
|
||||
<Offset x="0" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<TexCoords left="0" right="0.14453125" top="0.296875" bottom="0.578125"/>
|
||||
</Texture>
|
||||
<Texture name="$parentCategoryLeft" file="Interface\TokenFrame\UI-TokenFrame-CategoryButton">
|
||||
<Size>
|
||||
<AbsDimension x="256" y="18"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset x="0" y="0"/>
|
||||
</Anchor>
|
||||
<Anchor point="RIGHT" relativeTo="$parentCategoryRight" relativePoint="LEFT">
|
||||
<Offset x="0" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<TexCoords left="0" right="1" top="0" bottom="0.28125"/>
|
||||
</Texture>
|
||||
</Layer>
|
||||
<Layer level="ARTWORK">
|
||||
<Texture name="$parentExpandIcon" file="Interface\Buttons\UI-PlusMinus-Buttons">
|
||||
<Size>
|
||||
<AbsDimension x="7" y="7"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT">
|
||||
<Offset x="-8" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Frames>
|
||||
<Button enableMouse="true" parentKey="LinkButton">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="$parentIcon">
|
||||
<Offset x="0" y="0"/>
|
||||
</Anchor>
|
||||
<Anchor point="BOTTOMRIGHT" relativeTo="$parentIcon">
|
||||
<Offset x="0" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnEnter>
|
||||
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
|
||||
if ( self:GetParent().extraCurrencyType == 1 ) then
|
||||
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();
|
||||
elseif ( self:GetParent().extraCurrencyType == 2 ) then
|
||||
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();
|
||||
else
|
||||
GameTooltip:SetCurrencyToken(self:GetParent().index);
|
||||
end
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GameTooltip:Hide();
|
||||
</OnLeave>
|
||||
<OnClick>
|
||||
TokenButtonLinkButton_OnClick(self, button, down);
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
TokenButton_OnLoad(self);
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
TokenButton_OnClick(self, button, down);
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
<ButtonText>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</ButtonText>
|
||||
<NormalFont style="GameFontNormal"/>
|
||||
<HighlightTexture name="$parentHighlight" file="Interface\TokenFrame\UI-TokenFrame-CategoryButton" alphaMode="ADD">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset x="3" y="-2"/>
|
||||
</Anchor>
|
||||
<Anchor point="BOTTOMRIGHT">
|
||||
<Offset x="-3" y="2"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<TexCoords left="0" right="1" top="0.609375" bottom="0.796875"/>
|
||||
</HighlightTexture>
|
||||
</Button>
|
||||
<Frame name="TokenFrame" setAllPoints="true" parent="CharacterFrame" enableMouse="true" hidden="true" id="5">
|
||||
<HitRectInsets>
|
||||
<AbsInset left="0" right="30" top="0" bottom="45"/>
|
||||
</HitRectInsets>
|
||||
<Layers>
|
||||
<Layer level="ARTWORK">
|
||||
<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\TalentFrame\UI-TalentFrame-BotLeft">
|
||||
<Size>
|
||||
<AbsDimension x="256" y="256"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="-1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture file="Interface\TalentFrame\UI-TalentFrame-BotRight">
|
||||
<Size>
|
||||
<AbsDimension x="128" y="256"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="-1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Frames>
|
||||
<ScrollFrame name="$parentContainer" inherits="HybridScrollFrameTemplate">
|
||||
<Size x="299" y="330"/>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="26" y="-77"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Frames>
|
||||
<Slider name="$parentScrollBar" inherits="HybridScrollBarTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-12"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="11"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Slider>
|
||||
</Frames>
|
||||
</ScrollFrame>
|
||||
<Frame name="$parentMoneyFrame" inherits="SmallMoneyFrameTemplate" hidden="false">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMRIGHT" relativeTo="TokenFrame" relativePoint="BOTTOMRIGHT">
|
||||
<Offset x="-115" y="84"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Frame>
|
||||
<Button name="$parentCancelButton" inherits="UIPanelButtonTemplate" text="CLOSE">
|
||||
<Size>
|
||||
<AbsDimension x="80" y="22"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER" relativePoint="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="305" y="-421"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
HideUIPanel(self:GetParent():GetParent());
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button inherits="UIPanelCloseButton">
|
||||
<Anchors>
|
||||
<Anchor point="CENTER" relativeTo="CharacterFrame" relativePoint="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-44" y="-25"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnLoad function="TokenFrame_OnLoad"/>
|
||||
<OnShow function="TokenFrame_OnShow"/>
|
||||
<OnHide>
|
||||
TokenFramePopup:Hide();
|
||||
</OnHide>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
<Frame name="TokenFramePopup" parent="TokenFrame" toplevel="true" hidden="true" enableMouse="true">
|
||||
<Size>
|
||||
<AbsDimension x="205" y="100"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="TokenFrame" relativePoint="TOPRIGHT">
|
||||
<Offset x="-33" y="-28"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<FontString name="$parentTitle" inherits="GameFontNormal" text="TOKEN_OPTIONS">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="TokenFramePopup" relativePoint="TOPLEFT">
|
||||
<Offset x="25" y="-17"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
<Layer level="OVERLAY">
|
||||
<Texture name="$parentCorner" file="Interface\DialogFrame\UI-DialogBox-Corner">
|
||||
<Size>
|
||||
<AbsDimension x="32" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-6" y="-7"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Frames>
|
||||
<CheckButton name="$parentInactiveCheckBox" inherits="OptionsSmallCheckButtonTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="26" y="26"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="TokenFramePopup" relativePoint="TOPLEFT">
|
||||
<Offset x="32" y="-32"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
_G[self:GetName().."Text"]:SetText(UNUSED);
|
||||
_G[self:GetName().."Text"]:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
if ( self:GetChecked() ) then
|
||||
PlaySound("igMainMenuOptionCheckBoxOn");
|
||||
SetCurrencyUnused(TokenFrame.selectedID, 1);
|
||||
else
|
||||
PlaySound("igMainMenuOptionCheckBoxOff");
|
||||
SetCurrencyUnused(TokenFrame.selectedID, 0);
|
||||
end
|
||||
TokenFrame_Update();
|
||||
TokenFramePopup_CloseIfHidden();
|
||||
BackpackTokenFrame_Update();
|
||||
ManageBackpackTokenFrame();
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
|
||||
GameTooltip:SetText(TOKEN_MOVE_TO_UNUSED, nil, nil, nil, nil, 1);
|
||||
</OnEnter>
|
||||
<OnLeave function="GameTooltip_Hide"/>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<CheckButton name="$parentBackpackCheckBox" inherits="OptionsSmallCheckButtonTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="26" y="26"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="TokenFramePopupInactiveCheckBox" relativePoint="BOTTOMLEFT">
|
||||
<Offset x="0" y="4"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
_G[self:GetName().."Text"]:SetText(SHOW_ON_BACKPACK);
|
||||
_G[self:GetName().."Text"]:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
if ( self:GetChecked() ) then
|
||||
if ( GetNumWatchedTokens() >= MAX_WATCHED_TOKENS ) then
|
||||
UIErrorsFrame:AddMessage(format(TOO_MANY_WATCHED_TOKENS, MAX_WATCHED_TOKENS), 1.0, 0.1, 0.1, 1.0);
|
||||
self:SetChecked(false);
|
||||
return;
|
||||
end
|
||||
PlaySound("igMainMenuOptionCheckBoxOn");
|
||||
SetCurrencyBackpack(TokenFrame.selectedID, 1);
|
||||
else
|
||||
PlaySound("igMainMenuOptionCheckBoxOff");
|
||||
SetCurrencyBackpack(TokenFrame.selectedID, 0);
|
||||
end
|
||||
TokenFrame_Update();
|
||||
BackpackTokenFrame_Update();
|
||||
ManageBackpackTokenFrame();
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
|
||||
GameTooltip:SetText(TOKEN_SHOW_ON_BACKPACK, nil, nil, nil, nil, 1);
|
||||
</OnEnter>
|
||||
<OnLeave function="GameTooltip_Hide"/>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<Button name="$parentCloseButton" inherits="UIPanelCloseButton">
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-3" y="-3"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
</Frames>
|
||||
<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>
|
||||
</Frame>
|
||||
<Button name="BackpackTokenTemplate" hidden="true" virtual="true">
|
||||
<Size>
|
||||
<AbsDimension x="50" y="12"/>
|
||||
</Size>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<FontString name="$parentCount" inherits="GameFontHighlightSmall" justifyH="RIGHT">
|
||||
<Size x="38" y="10"/>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset x="0" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<Texture name="$parentIcon">
|
||||
<Size>
|
||||
<AbsDimension x="12" y="12"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentCount" relativePoint="RIGHT">
|
||||
<Offset x="0" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
local name = self:GetName();
|
||||
self.icon = _G[name.."Icon"];
|
||||
self.count = _G[name.."Count"];
|
||||
</OnLoad>
|
||||
<OnEnter>
|
||||
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
|
||||
if ( self.extraCurrencyType == 1 ) then
|
||||
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();
|
||||
elseif ( self.extraCurrencyType == 2 ) then
|
||||
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();
|
||||
else
|
||||
GameTooltip:SetBackpackToken(self:GetID());
|
||||
end
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GameTooltip:Hide();
|
||||
</OnLeave>
|
||||
<OnClick>
|
||||
BackpackTokenButton_OnClick(self, button, down);
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Frame name="BackpackTokenFrame" parent="UIParent">
|
||||
<Size>
|
||||
<AbsDimension x="183" y="32"/>
|
||||
</Size>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<Texture file="Interface\ContainerFrame\UI-Backpack-TokenFrame">
|
||||
<Size>
|
||||
<AbsDimension x="256" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset x="0" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Frames>
|
||||
<Button name="$parentToken1" inherits="BackpackTokenTemplate" id="1">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset x="13" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parentToken2" inherits="BackpackTokenTemplate" id="2">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentToken1" relativePoint="RIGHT">
|
||||
<Offset x="2" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parentToken3" inherits="BackpackTokenTemplate" id="3">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentToken2" relativePoint="RIGHT">
|
||||
<Offset x="2" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
</Frames>
|
||||
</Frame>
|
||||
</Ui>
|
||||
@@ -0,0 +1 @@
|
||||
-- This file is executed at the end of addon load
|
||||
Reference in New Issue
Block a user