mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Change Pearl's cursor logic.
Keyboard dragging while holding Control now moves the cursor to the target square. Shift-Control-arrowkey performs the previous behavior of Control-arrowkey.
This commit is contained in:

committed by
Simon Tatham

parent
d64a79e2b8
commit
bf8ff09a84
6
pearl.c
6
pearl.c
@ -2024,10 +2024,14 @@ static char *interpret_move(const game_state *state, game_ui *ui,
|
||||
if (!ui->cursor_active) {
|
||||
ui->cursor_active = TRUE;
|
||||
} else if (control | shift) {
|
||||
char *move;
|
||||
if (ui->ndragcoords > 0) return NULL;
|
||||
ui->ndragcoords = -1;
|
||||
return mark_in_direction(state, ui->curx, ui->cury,
|
||||
move = mark_in_direction(state, ui->curx, ui->cury,
|
||||
KEY_DIRECTION(button), control, tmpbuf);
|
||||
if (control && !shift && *move)
|
||||
move_cursor(button, &ui->curx, &ui->cury, w, h, FALSE);
|
||||
return move;
|
||||
} else {
|
||||
move_cursor(button, &ui->curx, &ui->cury, w, h, FALSE);
|
||||
if (ui->ndragcoords >= 0)
|
||||
|
Reference in New Issue
Block a user