added support for playing tape on score info page using key shortcut
authorHolger Schemel <info@artsoft.org>
Thu, 14 Apr 2022 22:46:41 +0000 (00:46 +0200)
committerHolger Schemel <info@artsoft.org>
Thu, 14 Apr 2022 22:46:41 +0000 (00:46 +0200)
src/events.c
src/screens.c
src/screens.h

index 9b4d733cec07eef20603a36c6cf5d4c089b80d6b..35f08ad0feea2b452b3759ac20b7ced8212d2aa2 100644 (file)
@@ -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;
index a080e7a841741720ef8da2c24a44706050ca39e9..6d409c44c7908b6ffc28c8ceb9d4e9ffe674b3e9 100644 (file)
@@ -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;
index 70b1fd497d26b9c7d912d8b463f45e6212702afd..8aa481f991d0e255a0feed6bbc85be53455852ad 100644 (file)
@@ -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);