editbox change. no longer highlights when gaining focus, double click highlights instead
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
Aux = {
|
||||
version = '2.11.7',
|
||||
version = '2.12.0',
|
||||
blizzard_ui_shown = false,
|
||||
orig = {},
|
||||
}
|
||||
|
||||
@@ -284,8 +284,11 @@ function m.editbox(parent, name)
|
||||
editbox:SetBackdropColor(unpack(m.config.content_color))
|
||||
editbox:SetBackdropBorderColor(unpack(m.config.content_border_color))
|
||||
|
||||
editbox:SetScript('OnEscapePressed', function()
|
||||
editbox:SetScript('OnEditFocusLost', function()
|
||||
this:HighlightText(0, 0)
|
||||
end)
|
||||
|
||||
editbox:SetScript('OnEscapePressed', function()
|
||||
this:ClearFocus()
|
||||
end)
|
||||
|
||||
|
||||
+22
-12
@@ -272,9 +272,6 @@ function public.on_load()
|
||||
private.write_settings(settings)
|
||||
end
|
||||
end)
|
||||
slider.editbox:SetScript('OnEditFocusLost', function()
|
||||
this:HighlightText(0, 0)
|
||||
end)
|
||||
slider.editbox:SetScript('OnTabPressed', function()
|
||||
if IsShiftKeyDown() then
|
||||
private.unit_buyout_price:SetFocus()
|
||||
@@ -303,9 +300,6 @@ function public.on_load()
|
||||
slider:SetValue(this:GetNumber())
|
||||
private.quantity_update()
|
||||
end)
|
||||
slider.editbox:SetScript('OnEditFocusLost', function()
|
||||
this:HighlightText(0, 0)
|
||||
end)
|
||||
slider.editbox:SetScript('OnTabPressed', function()
|
||||
if IsShiftKeyDown() then
|
||||
private.stack_size_slider.editbox:SetFocus()
|
||||
@@ -358,6 +352,7 @@ function public.on_load()
|
||||
editbox:SetJustifyH('RIGHT')
|
||||
editbox:SetWidth(150)
|
||||
editbox:SetScript('OnTextChanged', function()
|
||||
this.pretty:SetText(Aux.money.to_string(private.get_unit_start_price(), true, nil, 3))
|
||||
refresh = true
|
||||
end)
|
||||
editbox:SetScript('OnTabPressed', function()
|
||||
@@ -372,9 +367,16 @@ function public.on_load()
|
||||
editbox:SetScript('OnEnterPressed', function()
|
||||
this:ClearFocus()
|
||||
end)
|
||||
editbox:SetScript('OnEditFocusLost', function()
|
||||
this:SetText(Aux.money.to_string(private.get_unit_start_price(), true, nil, 3))
|
||||
editbox:SetScript('OnEditFocusGained', function()
|
||||
this.pretty:Hide()
|
||||
end)
|
||||
editbox:SetScript('OnEditFocusLost', function()
|
||||
this:SetText(Aux.money.to_string(private.get_unit_start_price(), true, nil, 3, nil, true))
|
||||
this.pretty:Show()
|
||||
end)
|
||||
editbox.pretty = Aux.gui.label(editbox, Aux.gui.config.normal_font_size)
|
||||
editbox.pretty:SetAllPoints()
|
||||
editbox.pretty:SetJustifyH('RIGHT')
|
||||
do
|
||||
local label = Aux.gui.label(editbox, 13)
|
||||
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
||||
@@ -395,6 +397,7 @@ function public.on_load()
|
||||
editbox:SetJustifyH('RIGHT')
|
||||
editbox:SetWidth(150)
|
||||
editbox:SetScript('OnTextChanged', function()
|
||||
this.pretty:SetText(Aux.money.to_string(private.get_unit_buyout_price(), true, nil, 3))
|
||||
refresh = true
|
||||
end)
|
||||
editbox:SetScript('OnTabPressed', function()
|
||||
@@ -407,9 +410,16 @@ function public.on_load()
|
||||
editbox:SetScript('OnEnterPressed', function()
|
||||
this:ClearFocus()
|
||||
end)
|
||||
editbox:SetScript('OnEditFocusLost', function()
|
||||
this:SetText(Aux.money.to_string(private.get_unit_buyout_price(), true, nil, 3))
|
||||
editbox:SetScript('OnEditFocusGained', function()
|
||||
this.pretty:Hide()
|
||||
end)
|
||||
editbox:SetScript('OnEditFocusLost', function()
|
||||
this:SetText(Aux.money.to_string(private.get_unit_buyout_price(), true, nil, 3, nil, true))
|
||||
this.pretty:Show()
|
||||
end)
|
||||
editbox.pretty = Aux.gui.label(editbox, Aux.gui.config.normal_font_size)
|
||||
editbox.pretty:SetAllPoints()
|
||||
editbox.pretty:SetJustifyH('RIGHT')
|
||||
do
|
||||
local label = Aux.gui.label(editbox, 13)
|
||||
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
||||
@@ -683,8 +693,8 @@ function private.set_item(item)
|
||||
private.stack_size_slider:SetValue(settings.stack_size)
|
||||
private.quantity_update(true)
|
||||
|
||||
private.unit_start_price:SetText(Aux.money.to_string(settings.start_price, true, nil, 3))
|
||||
private.unit_buyout_price:SetText(Aux.money.to_string(settings.buyout_price, true, nil, 3))
|
||||
private.unit_start_price:SetText(Aux.money.to_string(settings.start_price, true, nil, 3, nil, true))
|
||||
private.unit_buyout_price:SetText(Aux.money.to_string(settings.buyout_price, true, nil, 3, nil, true))
|
||||
|
||||
if not existing_auctions[selected_item.key] then
|
||||
private.refresh_entries()
|
||||
|
||||
Reference in New Issue
Block a user