MM: MM1: Added keybinding actions

This commit is contained in:
Paul Gilbert 2023-03-08 21:37:28 -08:00
parent bed08fd350
commit 1551124d28
2 changed files with 24 additions and 6 deletions

View File

@ -65,9 +65,33 @@ bool Game::msgKeypress(const KeypressMessage &msg) {
bool Game::msgAction(const ActionMessage &msg) {
switch (msg._action) {
case KEYBIND_BASH:
send("Bash", GameMessage("SHOW"));
break;
case KEYBIND_MAP:
addView("MapPopup");
return true;
case KEYBIND_ORDER:
addView("Order");
return true;
case KEYBIND_PROTECT:
addView("Protect");
return true;
case KEYBIND_QUICKREF:
addView("QuickRef");
return true;
case KEYBIND_REST:
g_events->send(GameMessage("REST"));
return true;
case KEYBIND_SEARCH:
send("Search", GameMessage("SHOW"));
break;
case KEYBIND_SPELL:
addView("CastSpell");
return true;
case KEYBIND_UNLOCK:
send("Unlock", GameMessage("SHOW"));
break;
default:
break;
}

View File

@ -58,12 +58,6 @@ bool GameCommands::msgAction(const ActionMessage & msg) {
case KEYBIND_MINIMAP:
_minimap.toggleMinimap();
return true;
case KEYBIND_MAP:
addView("MapPopup");
return true;
case KEYBIND_QUICKREF:
addView("QuickRef");
return true;
default:
break;
}