Files
aux-addon-ClassicAPI/experimental.xml
T

171 lines
5.5 KiB
XML

<Button name="$parentColumn2Item">
<Size><AbsDimension x="16" y="16"/></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="$parentColumn2"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="BORDER">
<Texture name="$parentIconTexture"/>
<FontString name="$parentCount" inherits="NumberFontNormal" justifyH="RIGHT" hidden="true">
<Anchors>
<Anchor point="BOTTOMRIGHT">
<Offset>
<AbsDimension x="-5" y="2"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="$parentStock" inherits="NumberFontNormalYellow" justifyH="LEFT" hidden="true">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-2"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
<HighlightTexture file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
<Scripts>
<OnEnter>
Aux.buy.icon_on_enter()
</OnEnter>
<OnLeave>
GameTooltip:Hide()
</OnLeave>
<OnClick>
AuxBuyEntry_OnClick(this:GetParent())
</OnClick>
</Scripts>
</Button>
<Frame name="AuxBuyConfirmation" hidden="true">
<Size x="634" y="306"/>
<Anchors>
<Anchor point="TOPLEFT" x="188" y="-103"/>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString parentKey="BuyoutLabel" inherits="GameFontNormalLarge" text="TOKEN_CURRENT_BUYOUT_PRICE" justifyH="RIGHT">
<Anchors>
<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOM" x="-2" y="117"/>
</Anchors>
</FontString>
<FontString parentKey="BuyoutPrice" inherits="NumberFontNormalLarge" justifyH="LEFT">
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="BOTTOM" x="2" y="117"/>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<Button parentKey="Token" name="$parentToken">
<Size x="254" y="61"/>
<Anchors>
<Anchor point="TOP" x="0" y="-63"/>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture parentKey="ItemBorder" atlas="token-itemslot" useAtlasSize="true">
<Anchors>
<Anchor point="TOPLEFT" x="2" y="-2"/>
</Anchors>
</Texture>
</Layer>
<Layer level="BORDER">
<Texture name="$parentIconTexture" parentKey="Icon">
<Size x="54" y="54"/>
<Anchors>
<Anchor point="TOPLEFT" x="3" y="-3"/>
</Anchors>
</Texture>
<FontString name="$parentName" inherits="GameFontHighlightLarge" justifyH="LEFT" parentKey="Name">
<Size x="172" y="46"/>
<Anchors>
<Anchor point="LEFT" x="73" y="0"/>
</Anchors>
</FontString>
</Layer>
<Layer level="ARTWORK">
<FontString name="$parentCount" inherits="NumberFontNormal" justifyH="RIGHT" parentKey="Count">
<Anchors>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentIconTexture" x="-1" y="1"/>
</Anchors>
</FontString>
</Layer>
<Layer level="OVERLAY">
<Texture parentKey="IconBorder" file="Interface\Common\WhiteIconFrame">
<Size x="54" y="54"/>
<Anchors>
<Anchor point="TOPLEFT" x="3" y="-3"/>
</Anchors>
<Color r="0" g="0.8" b="1"/>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_LEFT",5,-5);
GameTooltip:SetItemByID(122284);
GameTooltip:Show();
</OnEnter>
<OnLeave function="GameTooltip_Hide"/>
</Scripts>
</Button>
<Button parentKey="Buyout" inherits="UIPanelButtonTemplate" text="BUYOUT" motionScriptsWhileDisabled="true">
<Size x="140" y="30"/>
<Anchors>
<Anchor point="TOP" relativeKey="$parent.Token" relativePoint="BOTTOM" x="0" y="-87"/>
</Anchors>
<Scripts>
<OnClick function="BrowseWowTokenResultsBuyout_OnClick"/>
</Scripts>
<NormalFont style="GameFontNormalLarge" />
<HighlightFont style="GameFontHighlightLarge" />
<DisabledFont style="GameFontDisableLarge" />
</Button>
<Frame parentKey="InvisiblePriceFrame" enableMouse="true">
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent.BuyoutPrice" relativePoint="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT" relativeKey="$parent.BuyoutPrice" relativePoint="BOTTOMRIGHT"/>
</Anchors>
<Scripts>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(TOKEN_BUYOUT_PRICE_UPDATES, nil, nil, nil, nil, true);
GameTooltip:Show();
</OnEnter>
<OnLeave function="GameTooltip_Hide"/>
</Scripts>
</Frame>
</Frames>
<Scripts>
<OnEvent function="BrowseWowTokenResults_OnEvent"/>
</Scripts>
</Frame>
function BrowseWowTokenResults_Update()
BrowseWowTokenResults:Show();
FauxScrollFrame_Update(BrowseScrollFrame, 0, NUM_BROWSE_TO_DISPLAY, AUCTIONS_BUTTON_HEIGHT);
local marketPrice;
if (WowToken_IsWowTokenAuctionDialogShown()) then
marketPrice = C_WowTokenPublic.GetGuaranteedPrice();
else
marketPrice = C_WowTokenPublic.GetCurrentMarketPrice();
end
BrowseWowTokenResults:Show();
local itemName, _, itemQuality, _, _, _, _, _, _, itemTexture = GetItemInfo(WOW_TOKEN_ITEM_ID);
if itemName then
BrowseWowTokenResults.Token.Icon:SetTexture(itemTexture)
BrowseWowTokenResults.Token.Name:SetText(itemName);
BrowseWowTokenResults.Token.Name:SetTextColor(ITEM_QUALITY_COLORS[itemQuality].r, ITEM_QUALITY_COLORS[itemQuality].g, ITEM_QUALITY_COLORS[itemQuality].b);
BrowseWowTokenResults.BuyoutPrice:SetText(GetMoneyString(marketPrice, true));
if (GetMoney() < marketPrice) then
BrowseWowTokenResults.Buyout:SetEnabled(false);
else
BrowseWowTokenResults.Buyout:SetEnabled(true);
end
end
end