Fix characterlist being destroyed on ESC pressed closes #93
Signed-off-by: otfallen <f.fallen45@gmail.com>
This commit is contained in:
parent
eb7a11158a
commit
f5cbb62eff
|
@ -171,7 +171,7 @@ end
|
|||
|
||||
function CharacterList.create(characters, account, otui)
|
||||
if not otui then otui = 'characterlist.otui' end
|
||||
|
||||
|
||||
if charactersWindow then
|
||||
charactersWindow:destroy()
|
||||
end
|
||||
|
@ -243,7 +243,7 @@ function CharacterList.destroy()
|
|||
end
|
||||
|
||||
function CharacterList.show()
|
||||
if not loadBox and not errorBox and charactersWindow then
|
||||
if not loadBox and not errorBox then
|
||||
charactersWindow:show()
|
||||
charactersWindow:raise()
|
||||
charactersWindow:focus()
|
||||
|
|
|
@ -46,7 +46,7 @@ MainWindow
|
|||
size: 250 248
|
||||
visible: false
|
||||
@onEnter: CharacterList.doLogin()
|
||||
@onEscape: CharacterList.destroy()
|
||||
@onEscape: CharacterList.hide()
|
||||
@onSetup: |
|
||||
g_keyboard.bindKeyPress('Up', function() self:getChildById('characters'):focusPreviousChild(KeyboardFocusReason) end, self)
|
||||
g_keyboard.bindKeyPress('Down', function() self:getChildById('characters'):focusNextChild(KeyboardFocusReason) end, self)
|
||||
|
|
Loading…
Reference in New Issue