diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2023-08-10 23:33:31 +0100 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2023-08-13 16:44:24 +0100 |
| commit | 9f98144a0f4ced3bb3ab21d86883ab146f9ee0a4 (patch) | |
| tree | 3a2b4d612f5b35017108785f1d755ca7df5ea679 | |
| parent | dfca994cf6524c28b027e2331ea91281d835834d (diff) | |
| download | puzzles-9f98144a0f4ced3bb3ab21d86883ab146f9ee0a4.zip puzzles-9f98144a0f4ced3bb3ab21d86883ab146f9ee0a4.tar.gz puzzles-9f98144a0f4ced3bb3ab21d86883ab146f9ee0a4.tar.bz2 puzzles-9f98144a0f4ced3bb3ab21d86883ab146f9ee0a4.tar.xz | |
Palisade: use new move_cursor() features
| -rw-r--r-- | palisade.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -963,10 +963,10 @@ static char *interpret_move(const game_state *state, game_ui *ui, } if (IS_CURSOR_MOVE(button)) { - ui->show = true; if (control || shift) { borderflag flag = 0, newflag; int dir, i = ui->y * w + ui->x; + ui->show = true; x = ui->x; y = ui->y; move_cursor(button, &x, &y, w, h, false, NULL); @@ -988,10 +988,8 @@ static char *interpret_move(const game_state *state, game_ui *ui, if (shift) newflag |= DISABLED(BORDER(FLIP(dir))); return string(80, "F%d,%d,%dF%d,%d,%d", ui->x, ui->y, flag, x, y, newflag); - } else { - move_cursor(button, &ui->x, &ui->y, w, h, false, NULL); - return MOVE_UI_UPDATE; - } + } else + return move_cursor(button, &ui->x, &ui->y, w, h, false, &ui->show); } return NULL; |