walk and key event system rework with some regressions

This commit is contained in:
Eduardo Bart
2012-01-15 19:19:52 -02:00
parent 9ec40f016d
commit 44a20222bb
52 changed files with 542 additions and 346 deletions

View File

@@ -6,7 +6,8 @@ local loadBox
local characterList
-- private functions
local function onCharactersWindowKeyPress(self, keyCode, keyText, keyboardModifiers)
local function onCharactersWindowKeyPress(self, keyCode, keyboardModifiers, wouldFilter)
if wouldFilter then return end
if keyboardModifiers == KeyboardNoModifier then
if keyCode == KeyUp then
characterList:focusPreviousChild(ActiveFocusReason)

View File

@@ -57,7 +57,7 @@ end
-- public functions
function EnterGame.init()
enterGameButton = TopMenu.addButton('enterGameButton', 'Login (Ctrl + G)', '/core_styles/icons/login.png', EnterGame.openWindow)
Hotkeys.bind('Ctrl+G', EnterGame.openWindow)
Hotkeys.bindKeyDown('Ctrl+G', EnterGame.openWindow)
motdButton = TopMenu.addButton('motdButton', 'Message of the day', '/core_styles/icons/motd.png', EnterGame.displayMotd)
motdButton:hide()
enterGame = displayUI('entergame.otui')
@@ -82,7 +82,7 @@ function EnterGame.init()
end
function EnterGame.terminate()
Hotkeys.unbind('Ctrl+G')
Hotkeys.unbindKeyDown('Ctrl+G')
enterGame:destroy()
enterGame = nil
enterGameButton:destroy()