MM: MM1: More Select keybind action handling

This commit is contained in:
Paul Gilbert 2023-02-07 22:39:44 -08:00
parent 03895d242e
commit 4b9737a497
3 changed files with 29 additions and 6 deletions

View File

@ -119,9 +119,16 @@ bool GameMessages::msgAction(const ActionMessage &msg) {
if (endDelay())
return true;
if (msg._action == KEYBIND_ESCAPE) {
switch (msg._action) {
case KEYBIND_ESCAPE:
close();
return true;
case KEYBIND_SELECT:
close();
_ynCallback();
return true;
default:
break;
}
}

View File

@ -65,9 +65,15 @@ bool Market::msgAction(const ActionMessage &msg) {
if (endDelay())
return true;
if (msg._action == KEYBIND_ESCAPE) {
switch (msg._action) {
case KEYBIND_ESCAPE:
leave();
return true;
case KEYBIND_SELECT:
buyFood();
return true;
default:
break;
}
return false;

View File

@ -108,10 +108,20 @@ bool GameMessages::msgKeypress(const KeypressMessage &msg) {
}
bool GameMessages::msgAction(const ActionMessage &msg) {
if (msg._action == KEYBIND_ESCAPE && g_events->focusedView() == this) {
close();
g_events->drawElements();
return true;
if (g_events->focusedView()) {
switch (msg._action) {
case KEYBIND_ESCAPE:
close();
g_events->drawElements();
return true;
case KEYBIND_SELECT:
close();
g_events->drawElements();
_ynCallback();
return true;
default:
break;
}
}
return false;