editbox changes

This commit is contained in:
Manuel Simon Hirsig
2016-08-19 16:03:29 +02:00
parent 829483900e
commit 37e789184b
18 changed files with 422 additions and 404 deletions
+37 -37
View File
@@ -30,7 +30,7 @@ function create_frames()
local checkbox = aux.gui.checkbox(frame.inventory)
checkbox:SetPoint('TOPLEFT', 49, -16)
checkbox:SetScript('OnClick', function()
m.refresh = true
refresh = true
end)
local label = aux.gui.label(checkbox, aux.gui.config.small_font_size)
label:SetPoint('LEFT', checkbox, 'RIGHT', 4, 1)
@@ -105,17 +105,17 @@ function create_frames()
btn:SetText('Refresh')
btn:SetScript('OnClick', function()
aux.scan.abort(scan_id)
m.refresh_entries()
m.refresh = true
refresh_entries()
refresh = true
end)
refresh_button = btn
end
do
item = aux.gui.item(m.frame.parameters)
item = aux.gui.item(frame.parameters)
item:SetPoint('TOPLEFT', 10, -6)
item.button:SetScript('OnEnter', function()
if m.selected_item then
aux.info.set_tooltip(m.selected_item.itemstring, this, 'ANCHOR_RIGHT')
if selected_item then
aux.info.set_tooltip(selected_item.itemstring, this, 'ANCHOR_RIGHT')
end
end)
item.button:SetScript('OnLeave', function()
@@ -123,7 +123,7 @@ function create_frames()
end)
end
do
local slider = aux.gui.slider(m.frame.parameters)
local slider = aux.gui.slider(frame.parameters)
slider:SetValueStep(1)
slider:SetPoint('TOPLEFT', 13, -74)
slider:SetWidth(190)
@@ -134,18 +134,18 @@ function create_frames()
slider:SetValue(this:GetNumber())
quantity_update(true)
if selected_item then
local settings = m.read_settings()
local settings = read_settings()
settings.stack_size = this:GetNumber()
m.write_settings(settings)
write_settings(settings)
end
end)
slider.editbox:SetScript('OnTabPressed', function()
if IsShiftKeyDown() then
m.unit_buyout_price:SetFocus()
elseif m.stack_count_slider.editbox:IsVisible() then
m.stack_count_slider.editbox:SetFocus()
unit_buyout_price:SetFocus()
elseif stack_count_slider.editbox:IsVisible() then
stack_count_slider.editbox:SetFocus()
else
m.unit_start_price:SetFocus()
unit_start_price:SetFocus()
end
end)
slider.editbox:SetNumeric(true)
@@ -154,22 +154,22 @@ function create_frames()
stack_size_slider = slider
end
do
local slider = aux.gui.slider(m.frame.parameters)
local slider = aux.gui.slider(frame.parameters)
slider:SetValueStep(1)
slider:SetPoint('TOPLEFT', m.stack_size_slider, 'BOTTOMLEFT', 0, -32)
slider:SetPoint('TOPLEFT', stack_size_slider, 'BOTTOMLEFT', 0, -32)
slider:SetWidth(190)
slider:SetScript('OnValueChanged', function()
m.quantity_update()
quantity_update()
end)
slider.editbox:SetScript('OnTextChanged', function()
slider:SetValue(this:GetNumber())
m.quantity_update()
quantity_update()
end)
slider.editbox:SetScript('OnTabPressed', function()
if IsShiftKeyDown() then
m.stack_size_slider.editbox:SetFocus()
stack_size_slider.editbox:SetFocus()
else
m.unit_start_price:SetFocus()
unit_start_price:SetFocus()
end
end)
slider.editbox:SetNumeric(true)
@@ -177,42 +177,42 @@ function create_frames()
stack_count_slider = slider
end
do
local dropdown = aux.gui.dropdown(m.frame.parameters)
dropdown:SetPoint('TOPLEFT', m.stack_count_slider, 'BOTTOMLEFT', 0, -19)
local dropdown = aux.gui.dropdown(frame.parameters)
dropdown:SetPoint('TOPLEFT', stack_count_slider, 'BOTTOMLEFT', 0, -19)
dropdown:SetWidth(90)
local label = aux.gui.label(dropdown, aux.gui.config.small_font_size)
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
label:SetText('Duration')
UIDropDownMenu_Initialize(dropdown, m.initialize_duration_dropdown)
UIDropDownMenu_Initialize(dropdown, initialize_duration_dropdown)
dropdown:SetScript('OnShow', function()
UIDropDownMenu_Initialize(this, m.initialize_duration_dropdown)
UIDropDownMenu_Initialize(this, initialize_duration_dropdown)
end)
duration_dropdown = dropdown
end
do
local label = aux.gui.label(m.frame.parameters, aux.gui.config.medium_font_size)
label:SetPoint('LEFT', m.duration_dropdown, 'RIGHT', 25, 0)
local label = aux.gui.label(frame.parameters, aux.gui.config.medium_font_size)
label:SetPoint('LEFT', duration_dropdown, 'RIGHT', 25, 0)
deposit = label
end
do
local checkbox = aux.gui.checkbox(m.frame.parameters)
local checkbox = aux.gui.checkbox(frame.parameters)
checkbox:SetPoint('TOPRIGHT', -83, -6)
checkbox:SetScript('OnClick', function()
local settings = m.read_settings()
local settings = read_settings()
settings.hidden = this:GetChecked()
m.write_settings(settings)
m.refresh = true
write_settings(settings)
refresh = true
end)
local label = aux.gui.label(checkbox, aux.gui.config.small_font_size)
label:SetPoint('LEFT', checkbox, 'RIGHT', 4, 1)
label:SetText('Hide this item')
label:SetText 'Hide this item'
hide_checkbox = checkbox
end
do
local frame = CreateFrame('Frame', nil, frame.parameters)
start_price_frame = frame
aux.gui.set_content_style(frame)
frame:SetPoint('TOPRIGHT', frame.parameters, 'TOPRIGHT', -71, -60)
frame:SetPoint('TOPRIGHT', m.frame.parameters, 'TOPRIGHT', -71, -60)
frame:SetWidth(180)
frame:SetHeight(22)
local editbox = aux.gui.editbox(frame)
@@ -246,18 +246,18 @@ function create_frames()
editbox.pretty = aux.gui.label(frame, 17)
editbox.pretty:SetPoint('LEFT', 1, 0)
editbox.pretty:SetPoint('RIGHT', -2, 0)
editbox.pretty:SetJustifyH('RIGHT')
editbox.pretty:SetJustifyH 'RIGHT'
editbox.pretty:SetTextColor(unpack(aux.gui.color.text.enabled))
do
local label = aux.gui.label(frame, aux.gui.config.small_font_size)
label:SetPoint('BOTTOMLEFT', frame, 'TOPLEFT', -2, 1)
label:SetText('Unit Starting Price')
label:SetText 'Unit Starting Price'
end
do
local label = aux.gui.label(frame, 14)
label:SetPoint('LEFT', frame, 'RIGHT', 8, 0)
label:SetWidth(50)
label:SetJustifyH('CENTER')
label:SetJustifyH 'CENTER'
start_price_percentage = label
end
unit_start_price = editbox
@@ -301,8 +301,8 @@ function create_frames()
editbox.pretty = aux.gui.label(frame, 17)
editbox.pretty:SetPoint('LEFT', 1, 0)
editbox.pretty:SetPoint('RIGHT', -2, 0)
editbox.pretty:SetJustifyH('RIGHT')
editbox.pretty:SetTextColor(unpack(aux.gui.color.text.enabled))
editbox.pretty:SetJustifyH 'RIGHT'
editbox.pretty:SetTextColor(aux.gui.color.text.enabled())
do
local label = aux.gui.label(frame, aux.gui.config.small_font_size)
label:SetPoint('BOTTOMLEFT', frame, 'TOPLEFT', -2, 1)
@@ -321,7 +321,7 @@ function create_frames()
local btn = aux.gui.button(frame.parameters, 14)
btn:SetPoint('TOPRIGHT', -10, -146)
aux.gui.set_size(btn, 150, 20)
btn:GetFontString():SetJustifyH('RIGHT')
btn:GetFontString():SetJustifyH 'RIGHT'
btn:GetFontString():SetPoint('RIGHT', -2, 0)
btn:SetScript('OnClick', function()
if this.amount then