From 873b27792e33d27f2aae0dc47ecac33547d90221 Mon Sep 17 00:00:00 2001 From: cuoco Date: Fri, 5 Aug 2022 10:29:55 +0000 Subject: Add support for arrow keys on World Selection window. --- src/gui/windows/worldselectdialog.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp index 277c65424..f99467b5d 100644 --- a/src/gui/windows/worldselectdialog.cpp +++ b/src/gui/windows/worldselectdialog.cpp @@ -133,4 +133,18 @@ void WorldSelectDialog::keyPressed(KeyEvent &event) { action(ActionEvent(nullptr, mChooseWorld->getActionEventId())); } + + if (actionId == InputAction::GUI_UP) { + event.consume(); + + if (mWorldList->getSelected() > 0) { + mWorldList->setSelected(mWorldList->getSelected() - 1); + } + } + + if (actionId == InputAction::GUI_DOWN) { + event.consume(); + + mWorldList->setSelected(mWorldList->getSelected() + 1); + } } -- cgit v1.2.3-70-g09d2