allow using up/down arrows in modalWindow

QoL change, that's how it works in the official client
This commit is contained in:
Zbizu 2019-12-14 04:11:44 +01:00 committed by diath
parent a7785a3029
commit 45b14060f6

View File

@ -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]