summaryrefslogtreecommitdiff
path: root/src/gui/windows/worldselectdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows/worldselectdialog.cpp')
-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);
+ }
}