diff options
| author | Simon Tatham <anakin@pobox.com> | 2005-05-17 17:20:08 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2005-05-17 17:20:08 +0000 |
| commit | 0e197efe44db0371dcba395be41fe772dac02b01 (patch) | |
| tree | 48e02cfeded93043d0d64f959ba1b8fe4a548c5c /midend.c | |
| parent | f3a27738025ce7d2bce24548f13133ff499ff5f6 (diff) | |
| download | puzzles-0e197efe44db0371dcba395be41fe772dac02b01.zip puzzles-0e197efe44db0371dcba395be41fe772dac02b01.tar.gz puzzles-0e197efe44db0371dcba395be41fe772dac02b01.tar.bz2 puzzles-0e197efe44db0371dcba395be41fe772dac02b01.tar.xz | |
After much thought, I've decided that `Restart' on r is not a
particularly useful keypress, particularly given how easy it is to
confuse it with `Redo'. So both r and ^R are now Redo, and Restart
is relegated to being a menu-only option.
[originally from svn r5796]
Diffstat (limited to 'midend.c')
| -rw-r--r-- | midend.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -2,7 +2,7 @@ * midend.c: general middle fragment sitting between the * platform-specific front end and game-specific back end. * Maintains a move list, takes care of Undo and Redo commands, and - * processes standard keystrokes for undo/redo/new/restart/quit. + * processes standard keystrokes for undo/redo/new/quit. */ #include <stdio.h> @@ -238,6 +238,8 @@ void midend_restart_game(midend_data *me) { game_state *s; + midend_stop_anim(me); + assert(me->statepos >= 1); if (me->statepos == 1) return; /* no point doing anything at all! */ @@ -272,11 +274,6 @@ static int midend_really_process_key(midend_data *me, int x, int y, int button) midend_new_game(me); midend_redraw(me); return 1; /* never animate */ - } else if (button == 'r' || button == 'R') { - midend_stop_anim(me); - midend_restart_game(me); - midend_redraw(me); - return 1; /* never animate */ } else if (button == 'u' || button == 'u' || button == '\x1A' || button == '\x1F') { midend_stop_anim(me); @@ -284,7 +281,8 @@ static int midend_really_process_key(midend_data *me, int x, int y, int button) gotspecial = TRUE; if (!midend_undo(me)) return 1; - } else if (button == '\x12') { + } else if (button == 'r' || button == 'R' || + button == '\x12') { midend_stop_anim(me); if (!midend_redo(me)) return 1; |