projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed updating multiple pause button gadgets when toggling pause mode
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index e50017a9bed88bd57f2cc5403b066657abd53ddf..15cd41222e7e30e58cba6adf857a1dc87e3c06cc 100644
(file)
--- 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]);
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)
}
void UnmapUndoRedoButtons(void)
@@
-15722,8
+15720,21
@@
void UnmapUndoRedoButtons(void)
MapGameButtonsAtSamePosition(GAME_CTRL_ID_UNDO);
MapGameButtonsAtSamePosition(GAME_CTRL_ID_REDO);
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)
}
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]);
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)
}
static void SetGadgetState(struct GadgetInfo *gi, boolean state)