From 3e66c6792cc10afd72877d14eb00d63c3932e872 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 10 Jul 2021 13:13:56 +0200 Subject: [PATCH] fixed unmapping undo/redo buttons at non-standard position --- src/game.c | 18 +++++++++--------- src/game.h | 2 +- src/tape.c | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/game.c b/src/game.c index 72af644a..7e8f0bae 100644 --- a/src/game.c +++ b/src/game.c @@ -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[] = diff --git a/src/game.h b/src/game.h index 653a6454..60c80908 100644 --- a/src/game.h +++ b/src/game.h @@ -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); diff --git a/src/tape.c b/src/tape.c index 1ea9d80e..daa90c8d 100644 --- a/src/tape.c +++ b/src/tape.c @@ -835,7 +835,7 @@ void TapeTogglePause(boolean toggle_mode) if (tape.pausing) MapUndoRedoButtons(); else if (!tape.single_step) - UnmapUndoRedoButtons(); + MapLoadSaveButtons(); } ModifyPauseButtons(); -- 2.34.1