mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 20:14:54 +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:
@@ -55,6 +55,9 @@ function onModalDialog(id, title, message, buttons, enterButton, escapeButton, c
|
|||||||
end
|
end
|
||||||
choiceList:focusChild(choiceList:getFirstChild())
|
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
|
local buttonsWidth = 0
|
||||||
for i = 1, #buttons do
|
for i = 1, #buttons do
|
||||||
local buttonId = buttons[i][1]
|
local buttonId = buttons[i][1]
|
||||||
|
Reference in New Issue
Block a user