This commit is contained in:
Manuel Simon Hirsig
2015-10-14 18:19:58 +02:00
3 changed files with 143 additions and 16 deletions
+8 -1
View File
@@ -28,6 +28,7 @@ end
function Aux.buy.dialog_cancel()
Aux.scan.abort()
AuxBuyDialog:Hide()
AuxBuyList:Show()
AuxBuySearchButton:Enable()
end
@@ -149,6 +150,7 @@ function show_dialog(buyout_mode, hyperlink, stack_size, amount)
AuxBuyDialogBuyoutPrice:Hide()
AuxBuyDialogBid:Show()
end
AuxBuyList:Hide()
AuxBuyDialog:Show()
end
@@ -186,7 +188,7 @@ function AuxBuyEntry_OnClick(entry_index)
PlaySound("igMainMenuOptionCheckBoxOn")
local found
local order_key = Aux.auction_key(entry.tooltip, entry.stack_size, amount)
local order_key = Aux.auction_key(entry.tooltip, entry.stack_size, amount)
Aux.scan.start{
query = search_query,
@@ -260,6 +262,11 @@ function AuxBuyEntry_OnClick(entry_index)
AuxBuySearchButton:Enable()
end
end,
next_page = function(page, total_pages)
if not page or page == entry.page then
return entry.page - 1
end
end,
}
end
+4 -14
View File
@@ -276,19 +276,9 @@
</Scripts>
</Button>
<Frame name="AuxBuyDialog" frameStrata="FULLSCREEN_DIALOG" toplevel="true" enableMouse="true" hidden="true" movable="true">
<Frame name="AuxBuyDialog" hidden="true">
<Size><AbsDimension x="230" y="140" /></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="300" y="-150"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>this:RegisterForDrag("LeftButton")</OnLoad>
<OnDragStart>this:StartMoving()</OnDragStart>
<OnDragStop>this:StopMovingOrSizing()</OnDragStop>
</Scripts>
<Backdrop bgFile="Interface\CharacterFrame\UI-Party-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>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="300" y="-150"/></Offset></Anchor></Anchors>
<Frames>
<SimpleHTML name="$parentHTML">
<Size><AbsDimension x="170" y="1" wraponspaces="false" /></Size>
@@ -317,7 +307,7 @@
</Scripts>
</Button>
<Button name="$parentCancelButton" inherits="UIPanelButtonTemplate" text="Cancel">
<Size><AbsDimension x="85" y="22"/> </Size>
<Size><AbsDimension x="85" y="22"/></Size>
<Anchors><Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-20" y="15"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
@@ -329,4 +319,4 @@
</Frame>
</Frames>
</Frame>
</Ui>
</Ui>
+131 -1
View File
@@ -37,4 +37,134 @@
AuxBuyEntry_OnClick(this:GetParent())
</OnClick>
</Scripts>
</Button>
</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