From 6a9a0cd8f6ee83e6fbd3424c337bacfb8e90502a Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Thu, 10 Aug 2023 00:19:38 +0100 Subject: [PATCH] Magnets: use new move_cursor() features --- magnets.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/magnets.c b/magnets.c index 6d7eb00..7cb5fbc 100644 --- a/magnets.c +++ b/magnets.c @@ -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;