summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorcuoco <atunna2026@gmail.com>2022-08-05 10:29:55 +0000
committercuoco <atunna2026@gmail.com>2022-08-05 10:29:55 +0000
commit873b27792e33d27f2aae0dc47ecac33547d90221 (patch)
tree1e18347d6c3e962de4466a121a294ddf959ffbff /src/gui
parent6e494afc2f7e9449df8ea9b3cfc3b4881d7bab14 (diff)
downloadmanaverse-873b27792e33d27f2aae0dc47ecac33547d90221.tar.gz
manaverse-873b27792e33d27f2aae0dc47ecac33547d90221.tar.bz2
manaverse-873b27792e33d27f2aae0dc47ecac33547d90221.tar.xz
manaverse-873b27792e33d27f2aae0dc47ecac33547d90221.zip
Add support for arrow keys on World Selection window.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/worldselectdialog.cpp14
1 files changed, 14 insertions, 0 deletions
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);
+ }
}