some ui improvements

This commit is contained in:
Manuel Simon Hirsig
2016-08-06 16:07:31 +02:00
parent 135ebbd536
commit b94cabfc08
22 changed files with 379 additions and 318 deletions
+7 -7
View File
@@ -66,7 +66,7 @@ function public.FRAMES(f)
private.create_frames = f
end
function public.LOAD()
function m.LOAD()
m.create_frames(m, public, private)
m.new_search('')
m.update_tab(m.SAVED)
@@ -233,8 +233,8 @@ function private.start_real_time_scan(query, search, continuation)
if not ignore_page then
if search.auto_buy then
ctrl.suspend()
aux.place_bid('list', auction_record.index, auction_record.buyout_price, aux.f(ctrl.resume, true))
aux.control.thread(aux.control.when, aux.util.later(GetTime(), 10), aux.f(ctrl.resume, false))
aux.place_bid('list', auction_record.index, auction_record.buyout_price, aux._(ctrl.resume, true))
aux.control.thread(aux.control.when, aux.util.later(GetTime(), 10), aux._(ctrl.resume, false))
else
tinsert(new_records, auction_record)
end
@@ -329,8 +329,8 @@ function private.start_search(queries, continuation)
on_auction = function(auction_record, ctrl)
if search.auto_buy then
ctrl.suspend()
aux.place_bid('list', auction_record.index, auction_record.buyout_price, aux.f(ctrl.resume, true))
aux.control.thread(aux.control.when, aux.util.later(GetTime(), 10), aux.f(ctrl.resume, false))
aux.place_bid('list', auction_record.index, auction_record.buyout_price, aux._(ctrl.resume, true))
aux.control.thread(aux.control.when, aux.util.later(GetTime(), 10), aux._(ctrl.resume, false))
elseif getn(search.records) < 1000 then
tinsert(search.records, auction_record)
if getn(search.records) == 1000 then
@@ -488,7 +488,7 @@ do
aux.place_bid('list', index, record.bid_price, record.bid_price < record.buyout_price and function()
aux.info.bid_update(record)
search.table:SetDatabase()
end or aux.f(search.table.RemoveAuctionRecord, search.table, record))
end or aux._(search.table.RemoveAuctionRecord, search.table, record))
end
end)
m.bid_button:Enable()
@@ -497,7 +497,7 @@ do
if record.buyout_price > 0 then
m.buyout_button:SetScript('OnClick', function()
if m.test(record)(index) and search.table:ContainsRecord(record) then
aux.place_bid('list', index, record.buyout_price, aux.f(search.table.RemoveAuctionRecord, search.table, record))
aux.place_bid('list', index, record.buyout_price, aux._(search.table.RemoveAuctionRecord, search.table, record))
end
end)
m.buyout_button:Enable()