improved progress bar in search, now ignoring owner data in post
This commit is contained in:
+1
-1
@@ -92,7 +92,7 @@ local methods = {
|
||||
end,
|
||||
|
||||
OnIconLeave = function()
|
||||
AuxTooltip:Hide()
|
||||
GameTooltip:Hide()
|
||||
this:GetParent().row.rt.isShowingItemTooltip = nil
|
||||
end,
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ function public.on_load()
|
||||
Aux.info.set_tooltip(sheet.rows[row_index].itemstring, sheet.rows[row_index].EnhTooltip_info, this, 'ANCHOR_RIGHT', 0, 0)
|
||||
end,
|
||||
on_row_leave = function(sheet, row_index)
|
||||
AuxTooltip:Hide()
|
||||
GameTooltip:Hide()
|
||||
ResetCursor()
|
||||
end,
|
||||
on_row_update = function(sheet, row_index)
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ function public.on_load()
|
||||
Aux.info.set_tooltip(sheet.rows[row_index].itemstring, sheet.rows[row_index].EnhTooltip_info, this, 'ANCHOR_RIGHT', 0, 0)
|
||||
end,
|
||||
on_row_leave = function(sheet, row_index)
|
||||
AuxTooltip:Hide()
|
||||
GameTooltip:Hide()
|
||||
ResetCursor()
|
||||
end,
|
||||
on_row_update = function(sheet, row_index)
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
if this.itemstring then
|
||||
AuxTooltip:Hide()
|
||||
GameTooltip:Hide()
|
||||
end
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
|
||||
@@ -152,14 +152,29 @@ function public.set_tooltip(itemstring, EnhTooltip_info, owner, anchor, x_offset
|
||||
else
|
||||
private.anchor_cursor = false
|
||||
end
|
||||
-- GameTooltip_SetDefaultAnchor(AuxTooltip, UIParent)
|
||||
AuxTooltip:SetOwner(owner, anchor)
|
||||
|
||||
AuxTooltip:SetHyperlink(itemstring)
|
||||
GameTooltip:SetOwner(owner, anchor)
|
||||
GameTooltip:SetHyperlink(itemstring)
|
||||
|
||||
local item_id = tonumber(({strfind(itemstring, '^item:(%d+)')})[3])
|
||||
local item_info = Aux.static.item_info(item_id)
|
||||
local slot_index = item_info.class and item_info.subclass and Aux.item_slot_index(item_info.class, item_info.subclass, item_info.slot)
|
||||
snipe.log(slot_index)
|
||||
if slot_index then
|
||||
ShoppingTooltip1:SetOwner(GameTooltip, 'ANCHOR_BOTTOMRIGHT')
|
||||
ShoppingTooltip1:SetInventoryItem('player', slot_index)
|
||||
Aux.control.on_next_update(function()
|
||||
ShoppingTooltip1:SetPoint('TOPLEFT', GameTooltip, 'TOPRIGHT', 0, -10)
|
||||
end)
|
||||
end
|
||||
|
||||
-- ShoppingTooltip2:SetOwner(ShoppingTooltip1, "ANCHOR_BOTTOMRIGHT");
|
||||
-- ShoppingTooltip2:SetPoint("TOPLEFT", "ShoppingTooltip1", "TOPRIGHT", 0, 0);
|
||||
-- ShoppingTooltip2:SetAuctionCompareItem(type, index, 2);
|
||||
-- ShoppingTooltip2:Show();
|
||||
|
||||
AuxTooltip:Show()
|
||||
if EnhTooltip and EnhTooltip_info then
|
||||
EnhTooltip.TooltipCall(AuxTooltip, EnhTooltip_info.name, EnhTooltip_info.hyperlink, EnhTooltip_info.quality, EnhTooltip_info.count)
|
||||
EnhTooltip.TooltipCall(GameTooltip, EnhTooltip_info.name, EnhTooltip_info.hyperlink, EnhTooltip_info.quality, EnhTooltip_info.count)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ function public.on_load()
|
||||
Aux.info.set_tooltip(sheet.rows[row_index].itemstring, sheet.rows[row_index].EnhTooltip_info, this, 'ANCHOR_RIGHT', 0, 0)
|
||||
end,
|
||||
on_row_leave = function(sheet, row_index)
|
||||
AuxTooltip:Hide()
|
||||
GameTooltip:Hide()
|
||||
ResetCursor()
|
||||
end,
|
||||
on_row_update = function(sheet, row_index)
|
||||
@@ -355,7 +355,7 @@ function public.start_search()
|
||||
private.status_bar:update_status(100 * (page + 1) / total_pages, 100 * (page + 1) / total_pages) -- TODO
|
||||
private.status_bar:set_text(format('Scanning (Page %d / %d)', page + 1, total_pages))
|
||||
end,
|
||||
on_page_complete = function()
|
||||
on_page_scanned = function()
|
||||
refresh = true
|
||||
end,
|
||||
on_read_auction = function(auction_info)
|
||||
|
||||
+3
-2
@@ -97,7 +97,7 @@ function public.on_load()
|
||||
Aux.info.set_tooltip(row_data.itemstring, nil, column.row, 'ANCHOR_LEFT', 0, 0)
|
||||
end)
|
||||
private.inventory_listing:SetHandler('OnLeave', function()
|
||||
AuxTooltip:Hide()
|
||||
GameTooltip:Hide()
|
||||
end)
|
||||
|
||||
private.auction_listing = Aux.listing.CreateScrollingTable(AuxSellAuctions)
|
||||
@@ -638,10 +638,11 @@ function private.refresh_entries()
|
||||
private.status_bar:set_text('Scanning auctions...')
|
||||
|
||||
Aux.scan.start{
|
||||
no_wait_owners = true,
|
||||
queries = { query },
|
||||
on_page_loaded = function(page, total_pages)
|
||||
private.status_bar:update_status(100 * (page + 1) / total_pages, 100 * (page + 1) / total_pages) -- TODO
|
||||
private.status_bar:set_text(format('Scanning (Page %d / %d)', page + 1, total_pages))
|
||||
private.status_bar:set_text(format('Scanning Page %d / %d', page + 1, total_pages))
|
||||
end,
|
||||
on_read_auction = function(auction_info)
|
||||
if auction_info.item_key == item_key then
|
||||
|
||||
@@ -82,6 +82,9 @@ function wait_for_results(k)
|
||||
end
|
||||
|
||||
function wait_for_owner_data(k)
|
||||
if state.params.no_wait_owners then
|
||||
return k()
|
||||
end
|
||||
local t0 = time()
|
||||
return controller().wait(function()
|
||||
if time() - t0 > 4 then -- we won't wait longer than 4 seconds
|
||||
@@ -147,7 +150,7 @@ function private.process_query()
|
||||
|
||||
scan_auctions(count, function()
|
||||
|
||||
wait_for_callback{state.params.on_page_complete or Aux.util.pass, function()
|
||||
wait_for_callback{state.params.on_page_scanned or Aux.util.pass, function()
|
||||
if current_query().next_page then
|
||||
state.page = current_query().next_page(state.page, state.total_pages)
|
||||
else
|
||||
|
||||
+17
-12
@@ -188,7 +188,7 @@ function public.on_load()
|
||||
end
|
||||
do
|
||||
local editbox = Aux.gui.editbox(AuxFilterSearchFrame)
|
||||
editbox:SetMaxLetters(Aux.huge)
|
||||
editbox:SetMaxLetters(nil)
|
||||
editbox:EnableMouse(1)
|
||||
editbox.complete = Aux.test.complete
|
||||
editbox:SetPoint('TOPLEFT', 5, -8)
|
||||
@@ -672,8 +672,6 @@ end
|
||||
end
|
||||
elseif st == private.favorite_searches_listing then
|
||||
tremove(aux_favorite_searches, data.index)
|
||||
-- data.searchInfo.isFavorite = nil
|
||||
-- TSM:Printf('Removed '%s' from your favorite searches.', data.searchInfo.name)
|
||||
end
|
||||
private.update_search_listings()
|
||||
end
|
||||
@@ -768,18 +766,27 @@ function public.start_search()
|
||||
local scanned_records = {}
|
||||
private.results_listing:SetDatabase(scanned_records)
|
||||
|
||||
local current_page, current_total_pages, current_query
|
||||
Aux.scan.start{
|
||||
queries = queries,
|
||||
on_page_loaded = function(page, total_pages)
|
||||
private.status_bar:update_status(100 * (page + 1) / total_pages) -- TODO
|
||||
private.status_bar:set_text(format('Scanning (Page %d / %d)', page + 1, total_pages))
|
||||
current_page = page + 1
|
||||
current_total_pages = total_pages
|
||||
private.status_bar:update_status(100 * (current_page - 1) / current_total_pages, 100 * (current_query - 1) / getn(queries)) -- TODO
|
||||
private.status_bar:set_text(format('Scanning %d / %d (Page %d / %d)', current_query, getn(queries), current_page, current_total_pages))
|
||||
end,
|
||||
on_page_complete = function()
|
||||
on_page_scanned = function()
|
||||
private.results_listing:SetDatabase()
|
||||
end,
|
||||
on_start_query = function(query_index)
|
||||
private.status_bar:update_status(0, 100 * (query_index - 1) / getn(queries)) -- TODO
|
||||
private.status_bar:set_text(format('Processing query %d / %d', query_index, getn(queries)))
|
||||
current_query = query_index
|
||||
if current_page then
|
||||
private.status_bar:update_status(100 * (current_page - 1) / current_total_pages, 100 * (current_query - 1) / getn(queries)) -- TODO
|
||||
private.status_bar:set_text(format('Scanning %d / %d (Page %d / %d)', current_query, getn(queries), current_page, current_total_pages))
|
||||
else
|
||||
private.status_bar:update_status(0, 100 * current_query / getn(queries)) -- TODO
|
||||
private.status_bar:set_text(format('Scanning %d / %d', current_query, getn(queries)))
|
||||
end
|
||||
end,
|
||||
on_read_auction = function(auction_info)
|
||||
-- tinsert(scanned_records, private.create_auction_record(auction_info))
|
||||
@@ -889,8 +896,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--function private.create_auction_record(auction_info)
|
||||
--
|
||||
|
||||
-- if auction_info.current_bid == 0 then
|
||||
-- status = 'No Bid'
|
||||
-- elseif auction_info.high_bidder then
|
||||
@@ -898,8 +904,7 @@ end
|
||||
-- else
|
||||
-- status = 'Other Bidder'
|
||||
-- end
|
||||
--
|
||||
--end
|
||||
|
||||
|
||||
function private.initialize_class_dropdown()
|
||||
local function on_click()
|
||||
|
||||
Reference in New Issue
Block a user