GUI: Add the arrow keys to the GUI keymap

This commit is contained in:
Bastien Bouclet 2020-02-09 07:18:13 +01:00
parent 3567c4f159
commit 0f1e1894c1

View File

@ -128,6 +128,26 @@ Common::Keymap *GuiManager::getKeymap() const {
act->setKeyEvent(KeyState(KEYCODE_ESCAPE, ASCII_ESCAPE, 0));
guiMap->addAction(act);
act = new Action(kStandardActionMoveUp, _("Up"));
act->setKeyEvent(KEYCODE_UP);
act->addDefaultInputMapping("JOY_UP");
guiMap->addAction(act);
act = new Action(kStandardActionMoveDown, _("Down"));
act->setKeyEvent(KEYCODE_DOWN);
act->addDefaultInputMapping("JOY_DOWN");
guiMap->addAction(act);
act = new Action(kStandardActionMoveLeft, _("Left"));
act->setKeyEvent(KEYCODE_LEFT);
act->addDefaultInputMapping("JOY_LEFT");
guiMap->addAction(act);
act = new Action(kStandardActionMoveRight, _("Right"));
act->setKeyEvent(KEYCODE_RIGHT);
act->addDefaultInputMapping("JOY_RIGHT");
guiMap->addAction(act);
return guiMap;
}