minor editbox change
This commit is contained in:
+4
-4
@@ -1,4 +1,4 @@
|
|||||||
module'aux.tabs.post'
|
module 'aux.tabs.post'
|
||||||
|
|
||||||
local info = require 'aux.util.info'
|
local info = require 'aux.util.info'
|
||||||
local money = require 'aux.util.money'
|
local money = require 'aux.util.money'
|
||||||
@@ -265,13 +265,13 @@ do
|
|||||||
do
|
do
|
||||||
local label = gui.label(editbox, gui.font_size.small)
|
local label = gui.label(editbox, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
||||||
label:SetText'Unit Buyout Price'
|
label:SetText('Unit Buyout Price')
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local label = gui.label(editbox, 14)
|
local label = gui.label(editbox, 14)
|
||||||
label:SetPoint('LEFT', editbox, 'RIGHT', 8, 0)
|
label:SetPoint('LEFT', editbox, 'RIGHT', 8, 0)
|
||||||
label:SetWidth(50)
|
label:SetWidth(50)
|
||||||
label:SetJustifyH'CENTER'
|
label:SetJustifyH('CENTER')
|
||||||
buyout_price_percentage = label
|
buyout_price_percentage = label
|
||||||
end
|
end
|
||||||
unit_buyout_price_input = editbox
|
unit_buyout_price_input = editbox
|
||||||
@@ -290,6 +290,6 @@ do
|
|||||||
end)
|
end)
|
||||||
local label = gui.label(btn, gui.font_size.small)
|
local label = gui.label(btn, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', btn, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', btn, 'TOPLEFT', -2, 1)
|
||||||
label:SetText'Historical Value'
|
label:SetText('Historical Value')
|
||||||
historical_value_button = btn
|
historical_value_button = btn
|
||||||
end
|
end
|
||||||
+42
-28
@@ -87,9 +87,13 @@ do
|
|||||||
editbox:SetPoint('LEFT', range_button, 'RIGHT', 4, 0)
|
editbox:SetPoint('LEFT', range_button, 'RIGHT', 4, 0)
|
||||||
editbox:SetWidth(40)
|
editbox:SetWidth(40)
|
||||||
editbox:SetHeight(25)
|
editbox:SetHeight(25)
|
||||||
editbox:SetAlignment'CENTER'
|
editbox:SetAlignment('CENTER')
|
||||||
editbox:SetNumeric(true)
|
editbox:SetNumeric(true)
|
||||||
editbox:SetScript('OnTabPressed', function() last_page_input:SetFocus() end)
|
editbox:SetScript('OnTabPressed', function()
|
||||||
|
if not IsShiftKeyDown() then
|
||||||
|
last_page_input:SetFocus()
|
||||||
|
end
|
||||||
|
end)
|
||||||
editbox.enter = execute
|
editbox.enter = execute
|
||||||
editbox.change = change
|
editbox.change = change
|
||||||
local label = gui.label(editbox, gui.font_size.medium)
|
local label = gui.label(editbox, gui.font_size.medium)
|
||||||
@@ -103,9 +107,15 @@ do
|
|||||||
editbox:SetPoint('LEFT', first_page_input, 'RIGHT', 5.8, 0)
|
editbox:SetPoint('LEFT', first_page_input, 'RIGHT', 5.8, 0)
|
||||||
editbox:SetWidth(40)
|
editbox:SetWidth(40)
|
||||||
editbox:SetHeight(25)
|
editbox:SetHeight(25)
|
||||||
editbox:SetAlignment'CENTER'
|
editbox:SetAlignment('CENTER')
|
||||||
editbox:SetNumeric(true)
|
editbox:SetNumeric(true)
|
||||||
editbox:SetScript('OnTabPressed', function() first_page_input:SetFocus() end)
|
editbox:SetScript('OnTabPressed', function()
|
||||||
|
if IsShiftKeyDown() then
|
||||||
|
first_page_input:SetFocus()
|
||||||
|
else
|
||||||
|
search_box:SetFocus()
|
||||||
|
end
|
||||||
|
end)
|
||||||
editbox.enter = execute
|
editbox.enter = execute
|
||||||
editbox.change = change
|
editbox.change = change
|
||||||
last_page_input = editbox
|
last_page_input = editbox
|
||||||
@@ -129,7 +139,7 @@ do
|
|||||||
local btn = gui.button(frame)
|
local btn = gui.button(frame)
|
||||||
btn:SetHeight(25)
|
btn:SetHeight(25)
|
||||||
btn:SetPoint('TOPRIGHT', -5, -8)
|
btn:SetPoint('TOPRIGHT', -5, -8)
|
||||||
btn:SetText'Pause'
|
btn:SetText('Pause')
|
||||||
btn:SetScript('OnClick', function()
|
btn:SetScript('OnClick', function()
|
||||||
scan.abort(search_scan_id)
|
scan.abort(search_scan_id)
|
||||||
end)
|
end)
|
||||||
@@ -140,7 +150,7 @@ do
|
|||||||
btn:SetHeight(25)
|
btn:SetHeight(25)
|
||||||
btn:SetPoint('RIGHT', start_button, 'LEFT', -4, 0)
|
btn:SetPoint('RIGHT', start_button, 'LEFT', -4, 0)
|
||||||
btn:SetBackdropColor(color.state.enabled())
|
btn:SetBackdropColor(color.state.enabled())
|
||||||
btn:SetText'Resume'
|
btn:SetText('Resume')
|
||||||
btn:SetScript('OnClick', function()
|
btn:SetScript('OnClick', function()
|
||||||
execute(true)
|
execute(true)
|
||||||
end)
|
end)
|
||||||
@@ -159,7 +169,11 @@ do
|
|||||||
this:complete()
|
this:complete()
|
||||||
end
|
end
|
||||||
editbox:SetScript('OnTabPressed', function()
|
editbox:SetScript('OnTabPressed', function()
|
||||||
this:HighlightText(0, 0)
|
if IsShiftKeyDown() then
|
||||||
|
last_page_input:SetFocus()
|
||||||
|
else
|
||||||
|
this:HighlightText(0, 0)
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
editbox.enter = execute
|
editbox.enter = execute
|
||||||
search_box = editbox
|
search_box = editbox
|
||||||
@@ -172,7 +186,7 @@ do
|
|||||||
btn:SetPoint('BOTTOMLEFT', AuxFrame.content, 'TOPLEFT', 10, 8)
|
btn:SetPoint('BOTTOMLEFT', AuxFrame.content, 'TOPLEFT', 10, 8)
|
||||||
btn:SetWidth(243)
|
btn:SetWidth(243)
|
||||||
btn:SetHeight(22)
|
btn:SetHeight(22)
|
||||||
btn:SetText'Search Results'
|
btn:SetText('Search Results')
|
||||||
btn:SetScript('OnClick', function() subtab = RESULTS end)
|
btn:SetScript('OnClick', function() subtab = RESULTS end)
|
||||||
search_results_button = btn
|
search_results_button = btn
|
||||||
end
|
end
|
||||||
@@ -181,7 +195,7 @@ do
|
|||||||
btn:SetPoint('TOPLEFT', search_results_button, 'TOPRIGHT', 5, 0)
|
btn:SetPoint('TOPLEFT', search_results_button, 'TOPRIGHT', 5, 0)
|
||||||
btn:SetWidth(243)
|
btn:SetWidth(243)
|
||||||
btn:SetHeight(22)
|
btn:SetHeight(22)
|
||||||
btn:SetText'Saved Searches'
|
btn:SetText('Saved Searches')
|
||||||
btn:SetScript('OnClick', function() subtab = SAVED end)
|
btn:SetScript('OnClick', function() subtab = SAVED end)
|
||||||
saved_searches_button = btn
|
saved_searches_button = btn
|
||||||
end
|
end
|
||||||
@@ -190,7 +204,7 @@ do
|
|||||||
btn:SetPoint('TOPLEFT', saved_searches_button, 'TOPRIGHT', 5, 0)
|
btn:SetPoint('TOPLEFT', saved_searches_button, 'TOPRIGHT', 5, 0)
|
||||||
btn:SetWidth(243)
|
btn:SetWidth(243)
|
||||||
btn:SetHeight(22)
|
btn:SetHeight(22)
|
||||||
btn:SetText'Filter Builder'
|
btn:SetText('Filter Builder')
|
||||||
btn:SetScript('OnClick', function() subtab = FILTER end)
|
btn:SetScript('OnClick', function() subtab = FILTER end)
|
||||||
new_filter_button = btn
|
new_filter_button = btn
|
||||||
end
|
end
|
||||||
@@ -204,14 +218,14 @@ end
|
|||||||
do
|
do
|
||||||
local btn = gui.button(frame.results)
|
local btn = gui.button(frame.results)
|
||||||
btn:SetPoint('TOPLEFT', status_bar_frame, 'TOPRIGHT', 5, 0)
|
btn:SetPoint('TOPLEFT', status_bar_frame, 'TOPRIGHT', 5, 0)
|
||||||
btn:SetText'Bid'
|
btn:SetText('Bid')
|
||||||
btn:Disable()
|
btn:Disable()
|
||||||
bid_button = btn
|
bid_button = btn
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = gui.button(frame.results)
|
local btn = gui.button(frame.results)
|
||||||
btn:SetPoint('TOPLEFT', bid_button, 'TOPRIGHT', 5, 0)
|
btn:SetPoint('TOPLEFT', bid_button, 'TOPRIGHT', 5, 0)
|
||||||
btn:SetText'Buyout'
|
btn:SetText('Buyout')
|
||||||
btn:Disable()
|
btn:Disable()
|
||||||
buyout_button = btn
|
buyout_button = btn
|
||||||
end
|
end
|
||||||
@@ -227,14 +241,14 @@ end
|
|||||||
do
|
do
|
||||||
local btn1 = gui.button(frame.saved)
|
local btn1 = gui.button(frame.saved)
|
||||||
btn1:SetPoint('TOPLEFT', status_bar_frame, 'TOPRIGHT', 5, 0)
|
btn1:SetPoint('TOPLEFT', status_bar_frame, 'TOPRIGHT', 5, 0)
|
||||||
btn1:SetText'Favorite'
|
btn1:SetText('Favorite')
|
||||||
btn1:SetScript('OnClick', function()
|
btn1:SetScript('OnClick', function()
|
||||||
add_favorite(search_box:GetText())
|
add_favorite(search_box:GetText())
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local btn2 = gui.button(frame.saved)
|
local btn2 = gui.button(frame.saved)
|
||||||
btn2:SetPoint('LEFT', btn1, 'RIGHT', 5, 0)
|
btn2:SetPoint('LEFT', btn1, 'RIGHT', 5, 0)
|
||||||
btn2:SetText'Auto Buy'
|
btn2:SetText('Auto Buy')
|
||||||
btn2:SetScript('OnClick', function()
|
btn2:SetScript('OnClick', function()
|
||||||
add_auto_buy(search_box:GetText())
|
add_auto_buy(search_box:GetText())
|
||||||
update_search_listings()
|
update_search_listings()
|
||||||
@@ -243,7 +257,7 @@ end
|
|||||||
do
|
do
|
||||||
local btn1 = gui.button(frame.filter)
|
local btn1 = gui.button(frame.filter)
|
||||||
btn1:SetPoint('TOPLEFT', status_bar_frame, 'TOPRIGHT', 5, 0)
|
btn1:SetPoint('TOPLEFT', status_bar_frame, 'TOPRIGHT', 5, 0)
|
||||||
btn1:SetText'Search'
|
btn1:SetText('Search')
|
||||||
btn1:SetScript('OnClick', function()
|
btn1:SetScript('OnClick', function()
|
||||||
export_filter_string()
|
export_filter_string()
|
||||||
execute()
|
execute()
|
||||||
@@ -251,12 +265,12 @@ do
|
|||||||
|
|
||||||
local btn2 = gui.button(frame.filter)
|
local btn2 = gui.button(frame.filter)
|
||||||
btn2:SetPoint('LEFT', btn1, 'RIGHT', 5, 0)
|
btn2:SetPoint('LEFT', btn1, 'RIGHT', 5, 0)
|
||||||
btn2:SetText'Export'
|
btn2:SetText('Export')
|
||||||
btn2:SetScript('OnClick', export_filter_string)
|
btn2:SetScript('OnClick', export_filter_string)
|
||||||
|
|
||||||
local btn3 = gui.button(frame.filter)
|
local btn3 = gui.button(frame.filter)
|
||||||
btn3:SetPoint('LEFT', btn2, 'RIGHT', 5, 0)
|
btn3:SetPoint('LEFT', btn2, 'RIGHT', 5, 0)
|
||||||
btn3:SetText'Import'
|
btn3:SetText('Import')
|
||||||
btn3:SetScript('OnClick', import_filter_string)
|
btn3:SetScript('OnClick', import_filter_string)
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
@@ -283,7 +297,7 @@ do
|
|||||||
editbox.enter = papply(editbox.ClearFocus, editbox)
|
editbox.enter = papply(editbox.ClearFocus, editbox)
|
||||||
local label = gui.label(editbox, gui.font_size.small)
|
local label = gui.label(editbox, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
||||||
label:SetText'Name'
|
label:SetText('Name')
|
||||||
name_input = editbox
|
name_input = editbox
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
@@ -292,14 +306,14 @@ do
|
|||||||
checkbox:SetScript('OnClick', update_form)
|
checkbox:SetScript('OnClick', update_form)
|
||||||
local label = gui.label(checkbox, gui.font_size.small)
|
local label = gui.label(checkbox, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', checkbox, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', checkbox, 'TOPLEFT', -2, 1)
|
||||||
label:SetText'Exact'
|
label:SetText('Exact')
|
||||||
exact_checkbox = checkbox
|
exact_checkbox = checkbox
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local editbox = gui.editbox(frame.filter)
|
local editbox = gui.editbox(frame.filter)
|
||||||
editbox:SetPoint('TOPLEFT', name_input, 'BOTTOMLEFT', 0, -FILTER_SPACING)
|
editbox:SetPoint('TOPLEFT', name_input, 'BOTTOMLEFT', 0, -FILTER_SPACING)
|
||||||
editbox:SetWidth(125)
|
editbox:SetWidth(125)
|
||||||
editbox:SetAlignment'CENTER'
|
editbox:SetAlignment('CENTER')
|
||||||
editbox:SetNumeric(true)
|
editbox:SetNumeric(true)
|
||||||
editbox:SetScript('OnTabPressed', function()
|
editbox:SetScript('OnTabPressed', function()
|
||||||
if IsShiftKeyDown() then
|
if IsShiftKeyDown() then
|
||||||
@@ -318,14 +332,14 @@ do
|
|||||||
end
|
end
|
||||||
local label = gui.label(editbox, gui.font_size.small)
|
local label = gui.label(editbox, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
||||||
label:SetText'Level Range'
|
label:SetText('Level Range')
|
||||||
min_level_input = editbox
|
min_level_input = editbox
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local editbox = gui.editbox(frame.filter)
|
local editbox = gui.editbox(frame.filter)
|
||||||
editbox:SetPoint('TOPLEFT', min_level_input, 'TOPRIGHT', 10, 0)
|
editbox:SetPoint('TOPLEFT', min_level_input, 'TOPRIGHT', 10, 0)
|
||||||
editbox:SetWidth(125)
|
editbox:SetWidth(125)
|
||||||
editbox:SetAlignment'CENTER'
|
editbox:SetAlignment('CENTER')
|
||||||
editbox:SetNumeric(true)
|
editbox:SetNumeric(true)
|
||||||
editbox:SetScript('OnTabPressed', function()
|
editbox:SetScript('OnTabPressed', function()
|
||||||
if IsShiftKeyDown() then
|
if IsShiftKeyDown() then
|
||||||
@@ -353,7 +367,7 @@ do
|
|||||||
checkbox:SetScript('OnClick', update_form)
|
checkbox:SetScript('OnClick', update_form)
|
||||||
local label = gui.label(checkbox, gui.font_size.small)
|
local label = gui.label(checkbox, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', checkbox, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', checkbox, 'TOPLEFT', -2, 1)
|
||||||
label:SetText'Usable'
|
label:SetText('Usable')
|
||||||
usable_checkbox = checkbox
|
usable_checkbox = checkbox
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
@@ -363,7 +377,7 @@ do
|
|||||||
dropdown:SetWidth(300)
|
dropdown:SetWidth(300)
|
||||||
local label = gui.label(dropdown, gui.font_size.small)
|
local label = gui.label(dropdown, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
||||||
label:SetText'Item Class'
|
label:SetText('Item Class')
|
||||||
UIDropDownMenu_Initialize(dropdown, initialize_class_dropdown)
|
UIDropDownMenu_Initialize(dropdown, initialize_class_dropdown)
|
||||||
dropdown:SetScript('OnShow', function()
|
dropdown:SetScript('OnShow', function()
|
||||||
UIDropDownMenu_Initialize(this, initialize_class_dropdown)
|
UIDropDownMenu_Initialize(this, initialize_class_dropdown)
|
||||||
@@ -376,7 +390,7 @@ do
|
|||||||
dropdown:SetWidth(300)
|
dropdown:SetWidth(300)
|
||||||
local label = gui.label(dropdown, gui.font_size.small)
|
local label = gui.label(dropdown, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
||||||
label:SetText'Item Subclass'
|
label:SetText('Item Subclass')
|
||||||
UIDropDownMenu_Initialize(dropdown, initialize_subclass_dropdown)
|
UIDropDownMenu_Initialize(dropdown, initialize_subclass_dropdown)
|
||||||
dropdown:SetScript('OnShow', function()
|
dropdown:SetScript('OnShow', function()
|
||||||
UIDropDownMenu_Initialize(this, initialize_subclass_dropdown)
|
UIDropDownMenu_Initialize(this, initialize_subclass_dropdown)
|
||||||
@@ -389,7 +403,7 @@ do
|
|||||||
dropdown:SetWidth(300)
|
dropdown:SetWidth(300)
|
||||||
local label = gui.label(dropdown, gui.font_size.small)
|
local label = gui.label(dropdown, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
||||||
label:SetText'Item Slot'
|
label:SetText('Item Slot')
|
||||||
UIDropDownMenu_Initialize(dropdown, initialize_slot_dropdown)
|
UIDropDownMenu_Initialize(dropdown, initialize_slot_dropdown)
|
||||||
dropdown:SetScript('OnShow', function()
|
dropdown:SetScript('OnShow', function()
|
||||||
UIDropDownMenu_Initialize(this, initialize_slot_dropdown)
|
UIDropDownMenu_Initialize(this, initialize_slot_dropdown)
|
||||||
@@ -402,7 +416,7 @@ do
|
|||||||
dropdown:SetWidth(300)
|
dropdown:SetWidth(300)
|
||||||
local label = gui.label(dropdown, gui.font_size.small)
|
local label = gui.label(dropdown, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
||||||
label:SetText'Min Quality'
|
label:SetText('Min Quality')
|
||||||
UIDropDownMenu_Initialize(dropdown, initialize_quality_dropdown)
|
UIDropDownMenu_Initialize(dropdown, initialize_quality_dropdown)
|
||||||
dropdown:SetScript('OnShow', function()
|
dropdown:SetScript('OnShow', function()
|
||||||
UIDropDownMenu_Initialize(this, initialize_quality_dropdown)
|
UIDropDownMenu_Initialize(this, initialize_quality_dropdown)
|
||||||
@@ -420,7 +434,7 @@ do
|
|||||||
_G[dropdown:GetName() .. 'Text']:Hide()
|
_G[dropdown:GetName() .. 'Text']:Hide()
|
||||||
local label = gui.label(dropdown, gui.font_size.medium)
|
local label = gui.label(dropdown, gui.font_size.medium)
|
||||||
label:SetPoint('RIGHT', dropdown, 'LEFT', -15, 0)
|
label:SetPoint('RIGHT', dropdown, 'LEFT', -15, 0)
|
||||||
label:SetText'Post Filter'
|
label:SetText('Post Filter')
|
||||||
filter_dropdown = dropdown
|
filter_dropdown = dropdown
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
|
|||||||
+1
-1
@@ -297,7 +297,7 @@ function item_charges(tooltip)
|
|||||||
|
|
||||||
local charges = tonumber(left_charges_string) or tonumber(right_charges_string)
|
local charges = tonumber(left_charges_string) or tonumber(right_charges_string)
|
||||||
if charges then
|
if charges then
|
||||||
return max(1, charges) -- kronos bug? should never be 0
|
return max(1, charges) -- TODO kronos bug? should never be 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user