some ui improvements
This commit is contained in:
@@ -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()
|
||||
|
||||
+16
-20
@@ -50,7 +50,7 @@ aux.search_tab.FRAMES(function(m, public, private)
|
||||
do
|
||||
local panel = CreateFrame('Frame', nil, m.frame)
|
||||
panel:SetBackdrop{bgFile=[[Interface\Buttons\WHITE8X8]]}
|
||||
panel:SetBackdropColor(unpack(aux.gui.config.content_color.backdrop))
|
||||
panel:SetBackdropColor(unpack(aux.gui.color.content.backdrop))
|
||||
panel:SetPoint('LEFT', m.settings_button, 'RIGHT', 0, 0)
|
||||
panel:SetPoint('RIGHT', 0, 0)
|
||||
panel:SetHeight(42)
|
||||
@@ -79,15 +79,15 @@ aux.search_tab.FRAMES(function(m, public, private)
|
||||
end)
|
||||
editbox:SetScript('OnTextChanged', function()
|
||||
if m.blizzard_page_index(this:GetText()) and not m.real_time_button:GetChecked() then
|
||||
this:SetBackdropColor(unpack(aux.gui.config.on_color))
|
||||
this:SetBackdropColor(unpack(aux.gui.color.state.enabled))
|
||||
else
|
||||
this:SetBackdropColor(unpack(aux.gui.config.off_color))
|
||||
this:SetBackdropColor(unpack(aux.gui.color.state.disabled))
|
||||
end
|
||||
end)
|
||||
local label = aux.gui.label(editbox, aux.gui.config.medium_font_size)
|
||||
label:SetPoint('RIGHT', editbox, 'LEFT', -6, 0)
|
||||
label:SetText('Pages')
|
||||
label:SetTextColor(unpack(aux.gui.config.text_color.enabled))
|
||||
label:SetTextColor(unpack(aux.gui.color.text.enabled))
|
||||
private.first_page_input = editbox
|
||||
end
|
||||
do
|
||||
@@ -105,15 +105,15 @@ aux.search_tab.FRAMES(function(m, public, private)
|
||||
end)
|
||||
editbox:SetScript('OnTextChanged', function()
|
||||
if m.blizzard_page_index(this:GetText()) and not m.real_time_button:GetChecked() then
|
||||
this:SetBackdropColor(unpack(aux.gui.config.on_color))
|
||||
this:SetBackdropColor(unpack(aux.gui.color.state.enabled))
|
||||
else
|
||||
this:SetBackdropColor(unpack(aux.gui.config.off_color))
|
||||
this:SetBackdropColor(unpack(aux.gui.color.state.disabled))
|
||||
end
|
||||
end)
|
||||
local label = aux.gui.label(editbox, aux.gui.config.medium_font_size)
|
||||
label:SetPoint('RIGHT', editbox, 'LEFT', -3.5, 0)
|
||||
label:SetText('-')
|
||||
label:SetTextColor(unpack(aux.gui.config.text_color.enabled))
|
||||
label:SetTextColor(unpack(aux.gui.color.text.enabled))
|
||||
private.last_page_input = editbox
|
||||
end
|
||||
do
|
||||
@@ -379,19 +379,17 @@ aux.search_tab.FRAMES(function(m, public, private)
|
||||
m.min_level_input:SetFocus()
|
||||
end
|
||||
end)
|
||||
editbox:SetScript('OnEnterPressed', aux.f(editbox.ClearFocus, editbox))
|
||||
editbox:SetScript('OnEnterPressed', aux._(editbox.ClearFocus, editbox))
|
||||
local label = aux.gui.label(editbox, aux.gui.config.small_font_size)
|
||||
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
||||
label:SetText('Name')
|
||||
private.name_input = editbox
|
||||
end
|
||||
do
|
||||
local checkbox = CreateFrame('CheckButton', nil, m.frame.filter, 'UICheckButtonTemplate')
|
||||
checkbox:SetWidth(22)
|
||||
checkbox:SetHeight(22)
|
||||
checkbox:SetPoint('TOPLEFT', m.name_input, 'TOPRIGHT', 10, 0)
|
||||
local checkbox = aux.gui.checkbox(m.frame.filter)
|
||||
checkbox:SetPoint('TOPLEFT', m.name_input, 'TOPRIGHT', 16, 0)
|
||||
local label = aux.gui.label(checkbox, aux.gui.config.small_font_size)
|
||||
label:SetPoint('BOTTOMLEFT', checkbox, 'TOPLEFT', 1, -3)
|
||||
label:SetPoint('BOTTOMLEFT', checkbox, 'TOPLEFT', -2, 1)
|
||||
label:SetText('Exact')
|
||||
private.exact_checkbox = checkbox
|
||||
end
|
||||
@@ -408,7 +406,7 @@ aux.search_tab.FRAMES(function(m, public, private)
|
||||
m.max_level_input:SetFocus()
|
||||
end
|
||||
end)
|
||||
editbox:SetScript('OnEnterPressed', aux.f(editbox.ClearFocus, editbox))
|
||||
editbox:SetScript('OnEnterPressed', aux._(editbox.ClearFocus, editbox))
|
||||
local label = aux.gui.label(editbox, aux.gui.config.small_font_size)
|
||||
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
||||
label:SetText('Level Range')
|
||||
@@ -427,19 +425,17 @@ aux.search_tab.FRAMES(function(m, public, private)
|
||||
m.name_input:SetFocus()
|
||||
end
|
||||
end)
|
||||
editbox:SetScript('OnEnterPressed', aux.f(editbox.ClearFocus, editbox))
|
||||
editbox:SetScript('OnEnterPressed', aux._(editbox.ClearFocus, editbox))
|
||||
local label = aux.gui.label(editbox, aux.gui.config.medium_font_size)
|
||||
label:SetPoint('RIGHT', editbox, 'LEFT', -3, 0)
|
||||
label:SetText('-')
|
||||
private.max_level_input = editbox
|
||||
end
|
||||
do
|
||||
local checkbox = CreateFrame('CheckButton', nil, m.frame.filter, 'UICheckButtonTemplate')
|
||||
checkbox:SetWidth(22)
|
||||
checkbox:SetHeight(22)
|
||||
checkbox:SetPoint('TOPLEFT', m.max_level_input, 'TOPRIGHT', 10, 0)
|
||||
local checkbox = aux.gui.checkbox(m.frame.filter)
|
||||
checkbox:SetPoint('TOPLEFT', m.max_level_input, 'TOPRIGHT', 16, 0)
|
||||
local label = aux.gui.label(checkbox, aux.gui.config.small_font_size)
|
||||
label:SetPoint('BOTTOMLEFT', checkbox, 'TOPLEFT', 1, -3)
|
||||
label:SetPoint('BOTTOMLEFT', checkbox, 'TOPLEFT', -2, 1)
|
||||
label:SetText('Usable')
|
||||
private.usable_checkbox = checkbox
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user