MM: MM1: Allow Space & Enter to close message dialogs

This commit is contained in:
Paul Gilbert 2023-02-13 22:06:16 -08:00
parent 6132a66adb
commit a5d06949dc
2 changed files with 7 additions and 0 deletions

View File

@ -78,6 +78,10 @@ darkness:
bool ViewBase::msgAction(const ActionMessage &msg) {
switch (msg._action) {
case KEYBIND_SELECT:
// Shortcut for closing messages
g_events->redraw();
break;
case KEYBIND_FORWARDS:
case KEYBIND_STRAFE_LEFT:
case KEYBIND_STRAFE_RIGHT:

View File

@ -69,6 +69,7 @@ static const KeybindingRecord COMBAT_KEYS[] = {
};
static const KeybindingRecord NORMAL_KEYS[] = {
{ KEYBIND_SELECT, "SELECT", "Select", "RETURN", nullptr },
{ KEYBIND_FORWARDS, "FORWARDS", "Forwards", "UP", nullptr },
{ KEYBIND_BACKWARDS, "BACKWARDS", "Backwards", "DOWN", nullptr },
{ KEYBIND_TURN_LEFT, "TURN_LEFT", "Turn Left", "LEFT", nullptr },
@ -150,6 +151,8 @@ Common::KeymapArray MetaEngine::initKeymaps(KeybindingMode mode) {
act->addDefaultInputMapping(r->_key);
if (r->_joy)
act->addDefaultInputMapping(r->_joy);
if (r->_action == KEYBIND_SELECT)
act->addDefaultInputMapping("SPACE");
if (r->_action == KEYBIND_FORWARDS || r->_action == KEYBIND_BACKWARDS ||
r->_action == KEYBIND_TURN_LEFT || r->_action == KEYBIND_TURN_RIGHT ||