mirror of
https://github.com/edubart/otclient.git
synced 2025-04-29 17:19:20 +02:00
allow using up/down arrows in modalWindow
QoL change, that's how it works in the official client
This commit is contained in:
parent
a7785a3029
commit
45b14060f6
@ -55,6 +55,9 @@ function onModalDialog(id, title, message, buttons, enterButton, escapeButton, c
|
||||
end
|
||||
choiceList:focusChild(choiceList:getFirstChild())
|
||||
|
||||
g_keyboard.bindKeyPress('Down', function() choiceList:focusNextChild(KeyboardFocusReason) end, modalDialog)
|
||||
g_keyboard.bindKeyPress('Up', function() choiceList:focusPreviousChild(KeyboardFocusReason) end, modalDialog)
|
||||
|
||||
local buttonsWidth = 0
|
||||
for i = 1, #buttons do
|
||||
local buttonId = buttons[i][1]
|
||||
|
Loading…
x
Reference in New Issue
Block a user