fixed unmapping undo/redo buttons at non-standard position
authorHolger Schemel <info@artsoft.org>
Sat, 10 Jul 2021 11:13:56 +0000 (13:13 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 10 Jul 2021 11:13:56 +0000 (13:13 +0200)
src/game.c
src/game.h
src/tape.c

index 72af644a3b9f003cffc756c33ed58820d37d2269..7e8f0baec9e01db75ca00cf6401edf0ac18ff8a5 100644 (file)
@@ -16199,6 +16199,15 @@ static void MapGameButtonsAtSamePosition(int id)
   UnmapGameButtonsAtSamePosition_All();
 }
 
+void MapLoadSaveButtons(void)
+{
+  UnmapGameButtonsAtSamePosition(GAME_CTRL_ID_LOAD);
+  UnmapGameButtonsAtSamePosition(GAME_CTRL_ID_SAVE);
+
+  MapGadget(game_gadget[GAME_CTRL_ID_LOAD]);
+  MapGadget(game_gadget[GAME_CTRL_ID_SAVE]);
+}
+
 void MapUndoRedoButtons(void)
 {
   UnmapGameButtonsAtSamePosition(GAME_CTRL_ID_UNDO);
@@ -16208,15 +16217,6 @@ void MapUndoRedoButtons(void)
   MapGadget(game_gadget[GAME_CTRL_ID_REDO]);
 }
 
-void UnmapUndoRedoButtons(void)
-{
-  UnmapGadget(game_gadget[GAME_CTRL_ID_UNDO]);
-  UnmapGadget(game_gadget[GAME_CTRL_ID_REDO]);
-
-  MapGameButtonsAtSamePosition(GAME_CTRL_ID_UNDO);
-  MapGameButtonsAtSamePosition(GAME_CTRL_ID_REDO);
-}
-
 void ModifyPauseButtons(void)
 {
   static int ids[] =
index 653a6454722ac39dfc79b2cb22c8184ed095bda2..60c80908d8db67dea556c0955dc6ee8fa6d2391c 100644 (file)
@@ -470,8 +470,8 @@ boolean CheckEngineSnapshotList(void);
 
 void CreateGameButtons(void);
 void FreeGameButtons(void);
+void MapLoadSaveButtons(void);
 void MapUndoRedoButtons(void);
-void UnmapUndoRedoButtons(void);
 void ModifyPauseButtons(void);
 void MapGameButtons(void);
 void UnmapGameButtons(void);
index 1ea9d80e36f55aae65e216b01d886b1df7c16a57..daa90c8def387190e32605581b1e07f2fcd562f4 100644 (file)
@@ -835,7 +835,7 @@ void TapeTogglePause(boolean toggle_mode)
       if (tape.pausing)
        MapUndoRedoButtons();
       else if (!tape.single_step)
-       UnmapUndoRedoButtons();
+       MapLoadSaveButtons();
     }
 
     ModifyPauseButtons();