X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgame.c;h=15cd41222e7e30e58cba6adf857a1dc87e3c06cc;hb=a48a472e7e5b2e30f48a4cf29c2bf98c7de1b5af;hp=e50017a9bed88bd57f2cc5403b066657abd53ddf;hpb=e338cc862574dd965998d636818b8a62e71eccee;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index e50017a9..15cd4122 100644 --- a/src/game.c +++ b/src/game.c @@ -15711,8 +15711,6 @@ void MapUndoRedoButtons(void) MapGadget(game_gadget[GAME_CTRL_ID_UNDO]); MapGadget(game_gadget[GAME_CTRL_ID_REDO]); - - ModifyGadget(game_gadget[GAME_CTRL_ID_PAUSE2], GDI_CHECKED, TRUE, GDI_END); } void UnmapUndoRedoButtons(void) @@ -15722,8 +15720,21 @@ void UnmapUndoRedoButtons(void) MapGameButtonsAtSamePosition(GAME_CTRL_ID_UNDO); MapGameButtonsAtSamePosition(GAME_CTRL_ID_REDO); +} + +void ModifyPauseButtons(void) +{ + static int ids[] = + { + GAME_CTRL_ID_PAUSE, + GAME_CTRL_ID_PAUSE2, + GAME_CTRL_ID_PANEL_PAUSE, + -1 + }; + int i; - ModifyGadget(game_gadget[GAME_CTRL_ID_PAUSE2], GDI_CHECKED, FALSE, GDI_END); + for (i = 0; ids[i] > -1; i++) + ModifyGadget(game_gadget[ids[i]], GDI_CHECKED, tape.pausing, GDI_END); } static void MapGameButtonsExt(boolean on_tape) @@ -15757,10 +15768,6 @@ static void RedrawGameButtonsExt(boolean on_tape) for (i = 0; i < NUM_GAME_BUTTONS; i++) if (!on_tape || gamebutton_info[i].allowed_on_tape) RedrawGadget(game_gadget[i]); - - // RedrawGadget() may have set REDRAW_ALL if buttons are defined off-area - if (redraw_mask & REDRAW_ALL) - redraw_mask = REDRAW_FIELD | REDRAW_DOORS; } static void SetGadgetState(struct GadgetInfo *gi, boolean state)