From 7ad8393fb5b50b40bbdfd6041709b8336543f655 Mon Sep 17 00:00:00 2001 From: Zerf Date: Fri, 18 Sep 2015 19:43:11 +0300 Subject: [PATCH 1/2] Buy Tab tooltips --- buy.lua | 17 +++++++++++++++++ buy.xml | 6 ++++++ scan.lua | 3 +++ 3 files changed, 26 insertions(+) diff --git a/buy.lua b/buy.lua index a7814db..9d95b8c 100644 --- a/buy.lua +++ b/buy.lua @@ -120,6 +120,22 @@ function AuxBuyEntry_OnClick() PlaySound("igMainMenuOptionCheckBoxOn") end +function AuxBuyEntry_OnEnter() + local entryIndex = this:GetID() + local entry = entries[entryIndex] + + local found, _, itemString = string.find(entry.itemLink, "^|%x+|H(.+)|h%[.+%]") + if(found) then + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetHyperlink(itemString); + GameTooltip:Show(); + + if(EnhTooltip ~= nil) then + EnhTooltip.TooltipCall(GameTooltip, entry.name, entry.itemLink, entry.quality, entry.stackSize); + end + end +end + ----------------------------------------- function processScanResults(rawData) @@ -135,6 +151,7 @@ function processScanResults(rawData) buyoutPrice = rawDatum.buyoutPrice, itemPrice = rawDatum.buyoutPrice / rawDatum.count, quality = rawDatum.quality, + itemLink = rawDatum.itemLink, }) end end diff --git a/buy.xml b/buy.xml index 78c4814..afafb01 100644 --- a/buy.xml +++ b/buy.xml @@ -66,6 +66,12 @@ + + AuxBuyEntry_OnEnter(); + + + GameTooltip:Hide(); + AuxBuyEntry_OnClick() diff --git a/scan.lua b/scan.lua index a19e9b0..73406b3 100644 --- a/scan.lua +++ b/scan.lua @@ -160,6 +160,8 @@ function processQueryResults() for i = 1, numBatchAuctions do local name, texture, count, quality, canUse, level, minBid, minIncrement, buyoutPrice, bidAmount, highBidder, owner = GetAuctionItemInfo("list", i) + local itemLink = GetAuctionItemLink("list", i) + local duration = GetAuctionItemTimeLeft("list", i) Aux_Scan_ClearTooltip() AuxScanTooltip:SetOwner(UIParent, "ANCHOR_NONE"); @@ -183,6 +185,7 @@ function processQueryResults() highBidder = highBidder, owner = owner, duration = duration, + itemLink = itemLink, page = currentPage, pageIndex = i } From abe184ab9b368e9dd1636d9172bc2f1927f39ae2 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Wed, 23 Sep 2015 07:03:35 +0200 Subject: [PATCH 2/2] fixed a bug with bid buttons showing in buy tab --- core.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core.lua b/core.lua index ea15ba4..f477661 100644 --- a/core.lua +++ b/core.lua @@ -72,6 +72,15 @@ function Aux_OnAddonLoaded() Aux.tabs.buy.hiddenElements = { BidTitle, BidScrollFrame, + BidButton1, + BidButton2, + BidButton3, + BidButton4, + BidButton5, + BidButton6, + BidButton7, + BidButton8, + BidButton9, BidQualitySort, BidLevelSort, BidDurationSort,