mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
walk and key event system rework with some regressions
This commit is contained in:
@@ -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)
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user