mirror of
https://github.com/IllusionMan1212/cudoku.git
synced 2026-10-24 18:12:25 +00:00
game pausing
This commit is contained in:
@@ -74,8 +74,8 @@ void handle_keypress(XEvent xev, Cudoku *game) {
|
||||
generate_random_board(game);
|
||||
} else if (XLookupKeysym(&xev.xkey, 0) == XK_c) {
|
||||
toggle_check(game);
|
||||
/* } else if (XLookupKeysym(&xev.xkey, 0) == XK_p) { */
|
||||
/* pause(&game); */
|
||||
} else if (XLookupKeysym(&xev.xkey, 0) == XK_p) {
|
||||
pause_game(game);
|
||||
} else if (XLookupKeysym(&xev.xkey, 0) == XK_F1) {
|
||||
if (!toggle_help(game)) {
|
||||
timer_stop(&game->help_timer);
|
||||
@@ -174,6 +174,10 @@ int main(int argc, char *argv[]) {
|
||||
draw_win(&game);
|
||||
}
|
||||
|
||||
if (game.timer.state == TIMER_PAUSED) {
|
||||
draw_pause_overlay();
|
||||
}
|
||||
|
||||
zephr_swap_buffers();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user