filter bugfix

This commit is contained in:
Manuel Simon Hirsig
2016-08-11 19:14:17 +02:00
parent 4ee99e43e8
commit dba5dcdf8d
8 changed files with 55 additions and 68 deletions
+16
View File
@@ -80,6 +80,14 @@ function private.create_frames()
m.execute()
end)
editbox:SetScript('OnTextChanged', function()
local page = tonumber(this:GetText())
local valid_input = page and tostring(max(1, page)) or ''
if this:GetText() ~= valid_input then
this:SetText(valid_input)
end
if (tonumber(m.last_page_input:GetText()) or aux.huge) < (tonumber(this:GetText()) or 1) then
m.last_page_input:SetText(tonumber(this:GetText()))
end
if m.blizzard_page_index(this:GetText()) and not m.real_time_button:GetChecked() then
this:SetBackdropColor(unpack(aux.gui.color.state.enabled))
else
@@ -106,6 +114,14 @@ function private.create_frames()
m.execute()
end)
editbox:SetScript('OnTextChanged', function()
local page = tonumber(this:GetText())
local valid_input = page and tostring(max(1, page)) or ''
if this:GetText() ~= valid_input then
this:SetText(valid_input)
end
if (tonumber(m.first_page_input:GetText()) or 1) > (tonumber(this:GetText()) or aux.huge) then
m.first_page_input:SetText(tonumber(this:GetText()))
end
if m.blizzard_page_index(this:GetText()) and not m.real_time_button:GetChecked() then
this:SetBackdropColor(unpack(aux.gui.color.state.enabled))
else