mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Make peg removal accessible from the keyboard.
[originally from svn r6032]
This commit is contained in:
4
guess.c
4
guess.c
@ -714,6 +714,10 @@ static char *interpret_move(game_state *from, game_ui *ui, game_drawstate *ds,
|
|||||||
set_peg(&from->params, ui, ui->peg_cur, ui->colour_cur+1);
|
set_peg(&from->params, ui, ui->peg_cur, ui->colour_cur+1);
|
||||||
ret = "";
|
ret = "";
|
||||||
}
|
}
|
||||||
|
} else if (button == 'D' || button == 'd' || button == '\b') {
|
||||||
|
ui->display_cur = 1;
|
||||||
|
set_peg(&from->params, ui, ui->peg_cur, 0);
|
||||||
|
ret = "";
|
||||||
} else if (button == 'H' || button == 'h') {
|
} else if (button == 'H' || button == 'h') {
|
||||||
ui->display_cur = 1;
|
ui->display_cur = 1;
|
||||||
ui->holds[ui->peg_cur] = 1 - ui->holds[ui->peg_cur];
|
ui->holds[ui->peg_cur] = 1 - ui->holds[ui->peg_cur];
|
||||||
|
@ -1077,7 +1077,8 @@ after marking.
|
|||||||
Alternatively, with the keyboard, the up and down cursor keys can be
|
Alternatively, with the keyboard, the up and down cursor keys can be
|
||||||
used to select a peg colour, the left and right keys to select a
|
used to select a peg colour, the left and right keys to select a
|
||||||
peg position, and the space bar or Enter key to place a peg of the
|
peg position, and the space bar or Enter key to place a peg of the
|
||||||
selected colour in the chosen position. \q{H} adds a hold marker.
|
selected colour in the chosen position. \q{D} or Backspace removes a
|
||||||
|
peg, and \q{H} adds a hold marker.
|
||||||
|
|
||||||
When the guess is complete, the smaller feedback pegs will be highlighted;
|
When the guess is complete, the smaller feedback pegs will be highlighted;
|
||||||
clicking on these (or moving the peg cursor to them with the arrow keys
|
clicking on these (or moving the peg cursor to them with the arrow keys
|
||||||
|
Reference in New Issue
Block a user