Magnets: use new move_cursor() features

This commit is contained in:
Ben Harris
2023-08-10 00:19:38 +01:00
parent df2d6d347e
commit 6a9a0cd8f6

View File

@ -1843,12 +1843,10 @@ static char *interpret_move(const game_state *state, game_ui *ui,
char *nullret = NULL, buf[80], movech; char *nullret = NULL, buf[80], movech;
enum { CYCLE_MAGNET, CYCLE_NEUTRAL } action; enum { CYCLE_MAGNET, CYCLE_NEUTRAL } action;
if (IS_CURSOR_MOVE(button)) { if (IS_CURSOR_MOVE(button))
move_cursor(button, &ui->cur_x, &ui->cur_y, state->w, state->h, false, return move_cursor(button, &ui->cur_x, &ui->cur_y, state->w, state->h,
NULL); false, &ui->cur_visible);
ui->cur_visible = true; else if (IS_CURSOR_SELECT(button)) {
return MOVE_UI_UPDATE;
} else if (IS_CURSOR_SELECT(button)) {
if (!ui->cur_visible) { if (!ui->cur_visible) {
ui->cur_visible = true; ui->cur_visible = true;
return MOVE_UI_UPDATE; return MOVE_UI_UPDATE;