From: Holger Schemel Date: Sat, 10 Jul 2021 11:13:56 +0000 (+0200) Subject: fixed unmapping undo/redo buttons at non-standard position X-Git-Tag: 4.3.0.0~104 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=3e66c6792cc10afd72877d14eb00d63c3932e872;p=rocksndiamonds.git fixed unmapping undo/redo buttons at non-standard position --- 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();