working on refactoring of search options
This commit is contained in:
@@ -54,17 +54,16 @@ function public.inline_color(color)
|
|||||||
return format("|c%02X%02X%02X%02X", a, r, g, b)
|
return format("|c%02X%02X%02X%02X", a, r, g, b)
|
||||||
end
|
end
|
||||||
|
|
||||||
function public.panel(parent, name)
|
function public.panel(parent)
|
||||||
local panel = CreateFrame('Frame', name, parent)
|
local panel = CreateFrame('Frame', nil, parent)
|
||||||
panel:SetBackdrop({bgFile='Interface\\Buttons\\WHITE8X8', edgeFile='Interface\\Buttons\\WHITE8X8', edgeSize=m.config.edge_size})
|
panel:SetBackdrop{bgFile='Interface\\Buttons\\WHITE8X8'}
|
||||||
panel:SetBackdropColor(unpack(m.config.frame_color))
|
panel:SetBackdropColor(unpack(m.config.content_color))
|
||||||
panel:SetBackdropBorderColor(unpack(m.config.frame_border_color))
|
|
||||||
return panel
|
return panel
|
||||||
end
|
end
|
||||||
|
|
||||||
function public.button(parent, text_height, name)
|
function public.button(parent, text_height, name)
|
||||||
local button = CreateFrame('Button', name, parent)
|
local button = CreateFrame('Button', name, parent)
|
||||||
button:SetBackdrop({bgFile='Interface\\Buttons\\WHITE8X8', edgeFile='Interface\\Buttons\\WHITE8X8', edgeSize=m.config.edge_size})
|
button:SetBackdrop{bgFile='Interface\\Buttons\\WHITE8X8', edgeFile='Interface\\Buttons\\WHITE8X8', edgeSize=m.config.edge_size}
|
||||||
button:SetBackdropColor(unpack(m.config.content_color))
|
button:SetBackdropColor(unpack(m.config.content_color))
|
||||||
button:SetBackdropBorderColor(unpack(m.config.content_border_color))
|
button:SetBackdropBorderColor(unpack(m.config.content_border_color))
|
||||||
local highlight = button:CreateTexture(nil, 'HIGHLIGHT')
|
local highlight = button:CreateTexture(nil, 'HIGHLIGHT')
|
||||||
@@ -128,7 +127,7 @@ do
|
|||||||
tab.id = id
|
tab.id = id
|
||||||
tab.group = self
|
tab.group = self
|
||||||
tab:SetHeight(24)
|
tab:SetHeight(24)
|
||||||
tab:SetBackdrop({bgFile='Interface\\Buttons\\WHITE8X8', edgeFile='Interface\\Buttons\\WHITE8X8', edgeSize=m.config.edge_size})
|
tab:SetBackdrop{bgFile='Interface\\Buttons\\WHITE8X8', edgeFile='Interface\\Buttons\\WHITE8X8', edgeSize=m.config.edge_size}
|
||||||
tab:SetBackdropColor(0, 0, 0, 0)
|
tab:SetBackdropColor(0, 0, 0, 0)
|
||||||
tab:SetBackdropBorderColor(unpack(m.config.frame_border_color))
|
tab:SetBackdropBorderColor(unpack(m.config.frame_border_color))
|
||||||
local image = tab:CreateTexture(nil, 'BACKGROUND')
|
local image = tab:CreateTexture(nil, 'BACKGROUND')
|
||||||
@@ -231,7 +230,7 @@ function public.editbox(parent, name)
|
|||||||
editbox:SetHeight(19)
|
editbox:SetHeight(19)
|
||||||
editbox:SetFont(m.config.content_font, m.config.normal_font_size)
|
editbox:SetFont(m.config.content_font, m.config.normal_font_size)
|
||||||
editbox:SetShadowColor(0, 0, 0, 0)
|
editbox:SetShadowColor(0, 0, 0, 0)
|
||||||
editbox:SetBackdrop({bgFile='Interface\\Buttons\\WHITE8X8', edgeFile='Interface\\Buttons\\WHITE8X8', edgeSize=m.config.edge_size})
|
editbox:SetBackdrop{bgFile='Interface\\Buttons\\WHITE8X8', edgeFile='Interface\\Buttons\\WHITE8X8', edgeSize=m.config.edge_size}
|
||||||
editbox:SetBackdropColor(unpack(m.config.content_color))
|
editbox:SetBackdropColor(unpack(m.config.content_color))
|
||||||
editbox:SetBackdropBorderColor(unpack(m.config.content_border_color))
|
editbox:SetBackdropBorderColor(unpack(m.config.content_border_color))
|
||||||
|
|
||||||
@@ -385,7 +384,7 @@ do
|
|||||||
|
|
||||||
local dropdown = CreateFrame('Frame', 'aux_dropdown'..id, parent, 'UIDropDownMenuTemplate')
|
local dropdown = CreateFrame('Frame', 'aux_dropdown'..id, parent, 'UIDropDownMenuTemplate')
|
||||||
|
|
||||||
dropdown:SetBackdrop({bgFile='Interface\\Buttons\\WHITE8X8', edgeFile='Interface\\Buttons\\WHITE8X8', edgeSize=m.config.edge_size, insets={top=5,bottom=5}})
|
dropdown:SetBackdrop{bgFile='Interface\\Buttons\\WHITE8X8', edgeFile='Interface\\Buttons\\WHITE8X8', edgeSize=m.config.edge_size, insets={top=5,bottom=5}}
|
||||||
dropdown:SetBackdropColor(unpack(m.config.content_color))
|
dropdown:SetBackdropColor(unpack(m.config.content_color))
|
||||||
dropdown:SetBackdropBorderColor(unpack(m.config.content_border_color))
|
dropdown:SetBackdropBorderColor(unpack(m.config.content_border_color))
|
||||||
local left = getglobal(dropdown:GetName()..'Left'):Hide()
|
local left = getglobal(dropdown:GetName()..'Left'):Hide()
|
||||||
@@ -480,7 +479,7 @@ function public.slider(frame, name)
|
|||||||
slider:SetHeight(6)
|
slider:SetHeight(6)
|
||||||
slider:SetHitRectInsets(0, 0, -8, -8)
|
slider:SetHitRectInsets(0, 0, -8, -8)
|
||||||
slider:SetValue(0)
|
slider:SetValue(0)
|
||||||
slider:SetBackdrop({ bgFile='Interface\\Buttons\\WHITE8X8', edgeFile='Interface\\Buttons\\WHITE8X8', edgeSize=m.config.edge_size })
|
slider:SetBackdrop{ bgFile='Interface\\Buttons\\WHITE8X8', edgeFile='Interface\\Buttons\\WHITE8X8', edgeSize=m.config.edge_size }
|
||||||
slider:SetBackdropColor(unpack(m.config.frame_color))
|
slider:SetBackdropColor(unpack(m.config.frame_color))
|
||||||
slider:SetBackdropBorderColor(unpack(m.config.frame_border_color))
|
slider:SetBackdropBorderColor(unpack(m.config.frame_border_color))
|
||||||
local thumb_texture = slider:CreateTexture(nil, 'ARTWORK')
|
local thumb_texture = slider:CreateTexture(nil, 'ARTWORK')
|
||||||
@@ -505,7 +504,7 @@ function public.slider(frame, name)
|
|||||||
editbox:SetWidth(70)
|
editbox:SetWidth(70)
|
||||||
editbox:SetJustifyH('CENTER')
|
editbox:SetJustifyH('CENTER')
|
||||||
editbox:EnableMouse(true)
|
editbox:EnableMouse(true)
|
||||||
editbox:SetBackdrop({ bgFile='Interface\\Buttons\\WHITE8X8', edgeFile='Interface\\Buttons\\WHITE8X8', edgeSize=m.config.edge_size })
|
editbox:SetBackdrop{ bgFile='Interface\\Buttons\\WHITE8X8', edgeFile='Interface\\Buttons\\WHITE8X8', edgeSize=m.config.edge_size }
|
||||||
editbox:SetBackdropColor(unpack(m.config.content_color))
|
editbox:SetBackdropColor(unpack(m.config.content_color))
|
||||||
editbox:SetBackdropBorderColor(unpack(m.config.content_border_color))
|
editbox:SetBackdropBorderColor(unpack(m.config.content_border_color))
|
||||||
-- editbox:SetFont(m.config.content_font, m.config.normal_font_size)
|
-- editbox:SetFont(m.config.content_font, m.config.normal_font_size)
|
||||||
|
|||||||
+16
-8
@@ -48,14 +48,22 @@ StaticPopupDialogs['AUX_SEARCH_TABLE_FULL'] = {
|
|||||||
timeout = 0,
|
timeout = 0,
|
||||||
hideOnEscape = 1,
|
hideOnEscape = 1,
|
||||||
}
|
}
|
||||||
StaticPopupDialogs['AUX_SEARCH_AUTO_SNIPING'] = {
|
StaticPopupDialogs['AUX_SEARCH_AUTO_BUY'] = {
|
||||||
text = 'Do you want to activate automatic buyout for sniping?',
|
text = 'Do you want to activate automatic buyout?',
|
||||||
button1 = 'Yes',
|
button1 = 'Yes',
|
||||||
button2 = 'No',
|
button2 = 'No',
|
||||||
OnAccept = function()
|
OnAccept = function()
|
||||||
m.snipe_button.auto = true
|
m.auto_buy_checkbox:SetChecked(1)
|
||||||
local color = RED_FONT_COLOR
|
end,
|
||||||
m.snipe_button:GetFontString():SetTextColor(color.r, color.g, color.b)
|
timeout = 0,
|
||||||
|
hideOnEscape = 1,
|
||||||
|
}
|
||||||
|
StaticPopupDialogs['AUX_SEARCH_AUTO_BUY_FILTER'] = {
|
||||||
|
text = 'Do you want to activate the automatic buyout filter?',
|
||||||
|
button1 = 'Yes',
|
||||||
|
button2 = 'No',
|
||||||
|
OnAccept = function()
|
||||||
|
m.auto_buy_filter_checkbox:SetChecked(1)
|
||||||
end,
|
end,
|
||||||
timeout = 0,
|
timeout = 0,
|
||||||
hideOnEscape = 1,
|
hideOnEscape = 1,
|
||||||
@@ -247,13 +255,13 @@ end
|
|||||||
function public.enable_sniping()
|
function public.enable_sniping()
|
||||||
Aux.scan.abort(m.search_scan_id)
|
Aux.scan.abort(m.search_scan_id)
|
||||||
m.snipe = true
|
m.snipe = true
|
||||||
m.snipe_button:LockHighlight()
|
m.settings_button:LockHighlight()
|
||||||
end
|
end
|
||||||
|
|
||||||
function public.disable_sniping()
|
function public.disable_sniping()
|
||||||
Aux.scan.abort(m.search_scan_id)
|
Aux.scan.abort(m.search_scan_id)
|
||||||
m.snipe = false
|
m.snipe = false
|
||||||
m.snipe_button:UnlockHighlight()
|
m.settings_button:UnlockHighlight()
|
||||||
end
|
end
|
||||||
|
|
||||||
function private.start_sniping(query, search, continuation)
|
function private.start_sniping(query, search, continuation)
|
||||||
@@ -283,7 +291,7 @@ function private.start_sniping(query, search, continuation)
|
|||||||
end,
|
end,
|
||||||
on_auction = function(auction_record)
|
on_auction = function(auction_record)
|
||||||
if not ignore_page then
|
if not ignore_page then
|
||||||
if m.snipe_button.auto then
|
if m.settings_button.auto then
|
||||||
PlaceAuctionBid('list', auction_record.index, auction_record.buyout_price)
|
PlaceAuctionBid('list', auction_record.index, auction_record.buyout_price)
|
||||||
else
|
else
|
||||||
tinsert(new_records, auction_record)
|
tinsert(new_records, auction_record)
|
||||||
|
|||||||
+157
-74
@@ -24,35 +24,162 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
|||||||
m.frame.saved.recent:SetPoint('BOTTOMRIGHT', -4, 4)
|
m.frame.saved.recent:SetPoint('BOTTOMRIGHT', -4, 4)
|
||||||
do
|
do
|
||||||
local btn = Aux.gui.button(m.frame, 22)
|
local btn = Aux.gui.button(m.frame, 22)
|
||||||
btn:SetPoint('TOPLEFT', 5, -8)
|
btn:SetPoint('TOPLEFT', 0, 0)
|
||||||
btn:SetWidth(70)
|
btn:SetWidth(70)
|
||||||
btn:SetHeight(25)
|
btn:SetHeight(40)
|
||||||
btn:SetText('Snipe')
|
btn:SetText('_\n_\n_')
|
||||||
btn:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
|
-- btn:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
|
||||||
btn:SetScript('OnClick', function()
|
btn:SetScript('OnClick', function()
|
||||||
if arg1 == 'LeftButton' then
|
this.open = not this.open
|
||||||
if m.snipe then
|
if this.open then
|
||||||
m.disable_sniping()
|
m.settings:Show()
|
||||||
else
|
m.controls:Hide()
|
||||||
m.enable_sniping()
|
else
|
||||||
end
|
m.settings:Hide()
|
||||||
m.update_resume()
|
m.controls:Show()
|
||||||
elseif arg1 == 'RightButton' then
|
end
|
||||||
if this.auto then
|
end)
|
||||||
this.auto = false
|
btn.open = false
|
||||||
this:GetFontString():SetTextColor(unpack(Aux.gui.config.text_color.enabled))
|
private.settings_button = btn
|
||||||
else
|
end
|
||||||
StaticPopup_Show('AUX_SEARCH_AUTO_SNIPING')
|
do
|
||||||
|
local panel = Aux.gui.panel(m.frame)
|
||||||
|
panel:SetPoint('LEFT', m.settings_button, 'RIGHT', 0, 0)
|
||||||
|
panel:SetPoint('RIGHT', 0, 0)
|
||||||
|
panel:SetHeight(40)
|
||||||
|
panel:Hide()
|
||||||
|
private.settings = panel
|
||||||
|
end
|
||||||
|
do
|
||||||
|
local panel = CreateFrame('Frame', nil, m.frame)
|
||||||
|
panel:SetPoint('LEFT', m.settings_button, 'RIGHT', 0, 0)
|
||||||
|
panel:SetPoint('RIGHT', 0, 0)
|
||||||
|
panel:SetHeight(40)
|
||||||
|
private.controls = panel
|
||||||
|
end
|
||||||
|
do
|
||||||
|
local editbox = Aux.gui.editbox(m.settings)
|
||||||
|
editbox:SetBackdropColor(unpack(Aux.gui.config.frame_color))
|
||||||
|
editbox:SetPoint('LEFT', 60, 0)
|
||||||
|
editbox:SetWidth(30)
|
||||||
|
editbox:SetNumeric(true)
|
||||||
|
editbox:SetMaxLetters(nil)
|
||||||
|
editbox:SetScript('OnTabPressed', function()
|
||||||
|
if IsShiftKeyDown() then
|
||||||
|
m.max_level_input:SetFocus()
|
||||||
|
else
|
||||||
|
m.last_page_editbox:SetFocus()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
editbox:SetScript('OnEnterPressed', function()
|
||||||
|
this:ClearFocus()
|
||||||
|
m.execute()
|
||||||
|
end)
|
||||||
|
local label = Aux.gui.label(editbox, 15)
|
||||||
|
label:SetPoint('RIGHT', editbox, 'LEFT', -10, 0)
|
||||||
|
label:SetText('Pages')
|
||||||
|
private.first_page_editbox = editbox
|
||||||
|
end
|
||||||
|
do
|
||||||
|
local editbox = Aux.gui.editbox(m.settings)
|
||||||
|
editbox:SetBackdropColor(unpack(Aux.gui.config.frame_color))
|
||||||
|
editbox:SetPoint('LEFT', m.first_page_editbox, 'RIGHT', 10, 0)
|
||||||
|
editbox:SetWidth(30)
|
||||||
|
editbox:SetNumeric(true)
|
||||||
|
editbox:SetMaxLetters(nil)
|
||||||
|
editbox:SetScript('OnTabPressed', function()
|
||||||
|
if IsShiftKeyDown() then
|
||||||
|
m.first_page_editbox:SetFocus()
|
||||||
|
else
|
||||||
|
m.name_input:SetFocus()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
editbox:SetScript('OnEnterPressed', function()
|
||||||
|
this:ClearFocus()
|
||||||
|
m.execute()
|
||||||
|
end)
|
||||||
|
local label = Aux.gui.label(editbox, 15)
|
||||||
|
label:SetPoint('RIGHT', editbox, 'LEFT', -4, 0)
|
||||||
|
label:SetText('-')
|
||||||
|
private.last_page_editbox = editbox
|
||||||
|
end
|
||||||
|
do
|
||||||
|
local checkbox = CreateFrame('CheckButton', nil, m.settings, 'UICheckButtonTemplate')
|
||||||
|
checkbox:SetWidth(22)
|
||||||
|
checkbox:SetHeight(22)
|
||||||
|
checkbox:SetPoint('LEFT', 210, 0)
|
||||||
|
checkbox:SetScript('OnClick', function()
|
||||||
|
if m.snipe then
|
||||||
|
m.disable_sniping()
|
||||||
|
else
|
||||||
|
m.enable_sniping()
|
||||||
|
end
|
||||||
|
m.update_resume()
|
||||||
|
end)
|
||||||
|
local label = Aux.gui.label(checkbox, 15)
|
||||||
|
label:SetPoint('RIGHT', checkbox, 'LEFT', -10, 0)
|
||||||
|
label:SetText('Sniping')
|
||||||
|
private.snipe_checkbox = checkbox
|
||||||
|
end
|
||||||
|
do
|
||||||
|
local checkbox = CreateFrame('CheckButton', nil, m.settings, 'UICheckButtonTemplate')
|
||||||
|
checkbox:SetWidth(22)
|
||||||
|
checkbox:SetHeight(22)
|
||||||
|
checkbox:SetPoint('LEFT', 300, 0)
|
||||||
|
checkbox:SetScript('OnClick', function()
|
||||||
|
if this:GetChecked() then
|
||||||
|
this:SetChecked(nil)
|
||||||
|
StaticPopup_Show('AUX_SEARCH_AUTO_BUY')
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
local label = Aux.gui.label(checkbox, 15)
|
||||||
|
label:SetPoint('RIGHT', checkbox, 'LEFT', -10, 0)
|
||||||
|
label:SetText('Auto Buy')
|
||||||
|
private.auto_buy_checkbox = checkbox
|
||||||
|
end
|
||||||
|
do
|
||||||
|
local checkbox = CreateFrame('CheckButton', nil, m.settings, 'UICheckButtonTemplate')
|
||||||
|
checkbox:SetWidth(22)
|
||||||
|
checkbox:SetHeight(22)
|
||||||
|
checkbox:SetPoint('LEFT', 460, 0)
|
||||||
|
checkbox:SetScript('OnClick', function()
|
||||||
|
if this:GetChecked() then
|
||||||
|
this:SetChecked(nil)
|
||||||
|
if Aux.scan_util.parse_filter_string(m.auto_buy_filter_editbox:GetText()) then
|
||||||
|
StaticPopup_Show('AUX_SEARCH_AUTO_BUY_FILTER')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
btn.auto = false
|
local label = Aux.gui.label(checkbox, 15)
|
||||||
private.snipe_button = btn
|
label:SetPoint('RIGHT', checkbox, 'LEFT', -10, 0)
|
||||||
|
label:SetText('Auto Buy Filter')
|
||||||
|
private.auto_buy_filter_checkbox = checkbox
|
||||||
end
|
end
|
||||||
Aux.gui.vertical_line(m.frame, 80, nil, 408)
|
|
||||||
do
|
do
|
||||||
local btn = Aux.gui.button(m.frame, 26)
|
local editbox = Aux.gui.editbox(m.settings)
|
||||||
btn:SetPoint('LEFT', m.snipe_button, 'RIGHT', 12, 0)
|
editbox:SetBackdropColor(unpack(Aux.gui.config.frame_color))
|
||||||
|
editbox:SetMaxLetters(nil)
|
||||||
|
editbox:EnableMouse(1)
|
||||||
|
editbox.complete = Aux.completion.complete_filter
|
||||||
|
editbox:SetPoint('LEFT', 500, 0)
|
||||||
|
editbox:SetWidth(200)
|
||||||
|
editbox:SetHeight(25)
|
||||||
|
editbox:SetScript('OnChar', function()
|
||||||
|
this:complete()
|
||||||
|
end)
|
||||||
|
editbox:SetScript('OnTabPressed', function()
|
||||||
|
this:HighlightText(0, 0)
|
||||||
|
end)
|
||||||
|
editbox:SetScript('OnEnterPressed', function()
|
||||||
|
this:HighlightText(0, 0)
|
||||||
|
this:ClearFocus()
|
||||||
|
m.execute()
|
||||||
|
end)
|
||||||
|
private.auto_buy_filter_editbox = editbox
|
||||||
|
end
|
||||||
|
do
|
||||||
|
local btn = Aux.gui.button(m.controls, 26)
|
||||||
|
btn:SetPoint('LEFT', 12, 0)
|
||||||
btn:SetWidth(30)
|
btn:SetWidth(30)
|
||||||
btn:SetHeight(25)
|
btn:SetHeight(25)
|
||||||
btn:SetText('<')
|
btn:SetText('<')
|
||||||
@@ -60,7 +187,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
|||||||
private.previous_button = btn
|
private.previous_button = btn
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = Aux.gui.button(m.frame, 26)
|
local btn = Aux.gui.button(m.controls, 26)
|
||||||
btn:SetPoint('LEFT', m.previous_button, 'RIGHT', 4, 0)
|
btn:SetPoint('LEFT', m.previous_button, 'RIGHT', 4, 0)
|
||||||
btn:SetWidth(30)
|
btn:SetWidth(30)
|
||||||
btn:SetHeight(25)
|
btn:SetHeight(25)
|
||||||
@@ -69,7 +196,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
|||||||
private.next_button = btn
|
private.next_button = btn
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = Aux.gui.button(m.frame, 22)
|
local btn = Aux.gui.button(m.controls, 22)
|
||||||
btn:SetPoint('TOPRIGHT', -5, -8)
|
btn:SetPoint('TOPRIGHT', -5, -8)
|
||||||
btn:SetWidth(70)
|
btn:SetWidth(70)
|
||||||
btn:SetHeight(25)
|
btn:SetHeight(25)
|
||||||
@@ -84,7 +211,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
|||||||
private.start_button = btn
|
private.start_button = btn
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = Aux.gui.button(m.frame, 22)
|
local btn = Aux.gui.button(m.controls, 22)
|
||||||
btn:SetPoint('TOPRIGHT', -5, -8)
|
btn:SetPoint('TOPRIGHT', -5, -8)
|
||||||
btn:SetWidth(70)
|
btn:SetWidth(70)
|
||||||
btn:SetHeight(25)
|
btn:SetHeight(25)
|
||||||
@@ -96,7 +223,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
|||||||
private.stop_button = btn
|
private.stop_button = btn
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = Aux.gui.button(m.frame, 22)
|
local btn = Aux.gui.button(m.controls, 22)
|
||||||
btn:SetPoint('RIGHT', m.start_button, 'LEFT', -4, 0)
|
btn:SetPoint('RIGHT', m.start_button, 'LEFT', -4, 0)
|
||||||
btn:SetWidth(70)
|
btn:SetWidth(70)
|
||||||
btn:SetHeight(25)
|
btn:SetHeight(25)
|
||||||
@@ -107,10 +234,10 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
|||||||
private.resume_button = btn
|
private.resume_button = btn
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local editbox = Aux.gui.editbox(m.frame)
|
local editbox = Aux.gui.editbox(m.controls)
|
||||||
editbox:SetMaxLetters(nil)
|
editbox:SetMaxLetters(nil)
|
||||||
editbox:EnableMouse(1)
|
editbox:EnableMouse(1)
|
||||||
editbox.complete = Aux.completion.complete
|
editbox.complete = Aux.completion.complete_filter
|
||||||
editbox:SetPoint('RIGHT', m.start_button, 'LEFT', -4, 0)
|
editbox:SetPoint('RIGHT', m.start_button, 'LEFT', -4, 0)
|
||||||
editbox:SetHeight(25)
|
editbox:SetHeight(25)
|
||||||
editbox:SetScript('OnChar', function()
|
editbox:SetScript('OnChar', function()
|
||||||
@@ -255,7 +382,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
|||||||
end
|
end
|
||||||
do
|
do
|
||||||
local editbox = Aux.gui.editbox(m.frame.filter)
|
local editbox = Aux.gui.editbox(m.frame.filter)
|
||||||
editbox.complete_item = Aux.completion.completor(function() return aux_auctionable_items end)
|
editbox.complete_item = Aux.completion.complete(function() return aux_auctionable_items end)
|
||||||
editbox:SetPoint('TOPLEFT', 14, -20)
|
editbox:SetPoint('TOPLEFT', 14, -20)
|
||||||
editbox:SetWidth(260)
|
editbox:SetWidth(260)
|
||||||
editbox:SetScript('OnChar', function()
|
editbox:SetScript('OnChar', function()
|
||||||
@@ -399,50 +526,6 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
|||||||
end)
|
end)
|
||||||
private.quality_dropdown = dropdown
|
private.quality_dropdown = dropdown
|
||||||
end
|
end
|
||||||
do
|
|
||||||
local editbox = Aux.gui.editbox(m.frame.filter)
|
|
||||||
editbox:SetPoint('TOPLEFT', m.quality_dropdown, 'BOTTOMLEFT', 0, -18)
|
|
||||||
editbox:SetWidth(145)
|
|
||||||
editbox:SetNumeric(true)
|
|
||||||
editbox:SetMaxLetters(2)
|
|
||||||
editbox:SetScript('OnTabPressed', function()
|
|
||||||
if IsShiftKeyDown() then
|
|
||||||
m.max_level_input:SetFocus()
|
|
||||||
else
|
|
||||||
m.last_page_editbox:SetFocus()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
editbox:SetScript('OnEnterPressed', function()
|
|
||||||
this:ClearFocus()
|
|
||||||
m.execute()
|
|
||||||
end)
|
|
||||||
local label = Aux.gui.label(editbox, 13)
|
|
||||||
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
|
||||||
label:SetText('Page Range')
|
|
||||||
private.first_page_editbox = editbox
|
|
||||||
end
|
|
||||||
do
|
|
||||||
local editbox = Aux.gui.editbox(m.frame.filter)
|
|
||||||
editbox:SetPoint('TOPLEFT', m.first_page_editbox, 'TOPRIGHT', 10, 0)
|
|
||||||
editbox:SetWidth(145)
|
|
||||||
editbox:SetNumeric(true)
|
|
||||||
editbox:SetMaxLetters(2)
|
|
||||||
editbox:SetScript('OnTabPressed', function()
|
|
||||||
if IsShiftKeyDown() then
|
|
||||||
m.first_page_editbox:SetFocus()
|
|
||||||
else
|
|
||||||
m.name_input:SetFocus()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
editbox:SetScript('OnEnterPressed', function()
|
|
||||||
this:ClearFocus()
|
|
||||||
m.execute()
|
|
||||||
end)
|
|
||||||
local label = Aux.gui.label(editbox, 13)
|
|
||||||
label:SetPoint('RIGHT', editbox, 'LEFT', -4, 0)
|
|
||||||
label:SetText('-')
|
|
||||||
private.last_page_editbox = editbox
|
|
||||||
end
|
|
||||||
Aux.gui.vertical_line(m.frame.filter, 332)
|
Aux.gui.vertical_line(m.frame.filter, 332)
|
||||||
do
|
do
|
||||||
local label = Aux.gui.label(m.usable_checkbox, 13)
|
local label = Aux.gui.label(m.usable_checkbox, 13)
|
||||||
@@ -615,7 +698,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
|||||||
btn.inputs = {}
|
btn.inputs = {}
|
||||||
if filter.arity > 0 then
|
if filter.arity > 0 then
|
||||||
local editbox = Aux.gui.editbox(m.frame.filter)
|
local editbox = Aux.gui.editbox(m.frame.filter)
|
||||||
editbox.complete = Aux.completion.completor(function() return ({filter.test()})[2] end)
|
editbox.complete = Aux.completion.complete(function() return ({filter.test()})[2] end)
|
||||||
editbox:SetPoint('LEFT', btn, 'RIGHT', 10, 0)
|
editbox:SetPoint('LEFT', btn, 'RIGHT', 10, 0)
|
||||||
editbox:SetWidth(80)
|
editbox:SetWidth(80)
|
||||||
-- editbox:SetNumeric(true)
|
-- editbox:SetNumeric(true)
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
local m, public, private = Aux.module'completion'
|
local m, public, private = Aux.module'completion'
|
||||||
|
|
||||||
function public:complete()
|
function public:complete_filter()
|
||||||
if IsControlKeyDown() then -- TODO problem is ctrl-v, maybe find a better solution
|
if IsControlKeyDown() then -- TODO problem is ctrl-v, maybe find a better solution
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -22,7 +22,7 @@ function public:complete()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function public.completor(options)
|
function public.complete(options)
|
||||||
return function(self)
|
return function(self)
|
||||||
if IsControlKeyDown() then -- TODO problem is ctrl-v, maybe find a better solution
|
if IsControlKeyDown() then -- TODO problem is ctrl-v, maybe find a better solution
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user