diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2023-08-10 00:19:38 +0100 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2023-08-13 16:44:24 +0100 |
| commit | 6a9a0cd8f6ee83e6fbd3424c337bacfb8e90502a (patch) | |
| tree | 75c7ae27960f8b3457aa941e1645826f7f01e679 /magnets.c | |
| parent | df2d6d347e7e4dc0d74df708906844ed67b1b358 (diff) | |
| download | puzzles-6a9a0cd8f6ee83e6fbd3424c337bacfb8e90502a.zip puzzles-6a9a0cd8f6ee83e6fbd3424c337bacfb8e90502a.tar.gz puzzles-6a9a0cd8f6ee83e6fbd3424c337bacfb8e90502a.tar.bz2 puzzles-6a9a0cd8f6ee83e6fbd3424c337bacfb8e90502a.tar.xz | |
Magnets: use new move_cursor() features
Diffstat (limited to 'magnets.c')
| -rw-r--r-- | magnets.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1843,12 +1843,10 @@ static char *interpret_move(const game_state *state, game_ui *ui, char *nullret = NULL, buf[80], movech; enum { CYCLE_MAGNET, CYCLE_NEUTRAL } action; - if (IS_CURSOR_MOVE(button)) { - move_cursor(button, &ui->cur_x, &ui->cur_y, state->w, state->h, false, - NULL); - ui->cur_visible = true; - return MOVE_UI_UPDATE; - } else if (IS_CURSOR_SELECT(button)) { + if (IS_CURSOR_MOVE(button)) + return move_cursor(button, &ui->cur_x, &ui->cur_y, state->w, state->h, + false, &ui->cur_visible); + else if (IS_CURSOR_SELECT(button)) { if (!ui->cur_visible) { ui->cur_visible = true; return MOVE_UI_UPDATE; |