mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 07:31:30 -07:00
Magnets: use new move_cursor() features
This commit is contained in:
10
magnets.c
10
magnets.c
@ -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;
|
||||||
|
Reference in New Issue
Block a user