From: Holger Schemel Date: Thu, 14 Apr 2022 22:46:41 +0000 (+0200) Subject: added support for playing tape on score info page using key shortcut X-Git-Tag: 4.3.2.0~12 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=8ff72a216ac9dfefcb4cf85b47063600867ceec2;p=rocksndiamonds.git added support for playing tape on score info page using key shortcut --- diff --git a/src/events.c b/src/events.c index 9b4d733c..35f08ad0 100644 --- a/src/events.c +++ b/src/events.c @@ -2299,6 +2299,11 @@ void HandleKey(Key key, int key_status) HandleSoundButtonKeys(key); } + if (game_status == GAME_MODE_SCOREINFO) + { + HandleScreenGadgetKeys(key); + } + if (game_status == GAME_MODE_PLAYING && !network_playing) { int centered_player_nr_next = -999; diff --git a/src/screens.c b/src/screens.c index a080e7a8..6d409c44 100644 --- a/src/screens.c +++ b/src/screens.c @@ -10255,6 +10255,12 @@ static void HandleScreenGadgets(struct GadgetInfo *gi) } } +void HandleScreenGadgetKeys(Key key) +{ + if (key == setup.shortcut.tape_play) + HandleScreenGadgets(screen_gadget[SCREEN_CTRL_ID_PLAY_TAPE]); +} + void DumpScreenIdentifiers(void) { int i; diff --git a/src/screens.h b/src/screens.h index 70b1fd49..8aa481f9 100644 --- a/src/screens.h +++ b/src/screens.h @@ -39,6 +39,7 @@ void HandleInfoScreen(int, int, int, int, int); void HandleSetupScreen(int, int, int, int, int); void HandleTypeName(Key); void HandleGameActions(void); +void HandleScreenGadgetKeys(Key); void CreateScreenGadgets(void); void FreeScreenGadgets(void);