From dcb644e65cff2d734c47198dedc9621fdf1cf5f5 Mon Sep 17 00:00:00 2001 From: Simon Hirsig Date: Wed, 14 Oct 2015 11:57:32 +0200 Subject: [PATCH 1/3] now searching two pages instead of one for buying --- buy.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/buy.lua b/buy.lua index 3797226..021ff24 100644 --- a/buy.lua +++ b/buy.lua @@ -186,7 +186,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 +260,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 From d3f47b939baddc0e950f272173ec1cd12318a649 Mon Sep 17 00:00:00 2001 From: Simon Hirsig Date: Wed, 14 Oct 2015 12:22:21 +0200 Subject: [PATCH 2/3] dialog now embedded --- buy.lua | 2 ++ buy.xml | 18 ++++-------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/buy.lua b/buy.lua index 021ff24..3ea3f97 100644 --- a/buy.lua +++ b/buy.lua @@ -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 diff --git a/buy.xml b/buy.xml index d15903a..e6c6256 100644 --- a/buy.xml +++ b/buy.xml @@ -276,19 +276,9 @@ - + - - - this:RegisterForDrag("LeftButton") - this:StartMoving() - this:StopMovingOrSizing() - - - - - - + @@ -317,7 +307,7 @@ \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GameTooltip:SetOwner(self, "ANCHOR_RIGHT"); + GameTooltip:SetText(TOKEN_BUYOUT_PRICE_UPDATES, nil, nil, nil, nil, true); + GameTooltip:Show(); + + + + + + + + + + +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