diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2023-08-11 00:39:28 +0100 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2023-08-13 16:44:24 +0100 |
| commit | 2aa5708bc725cb48a0d6629dc97bad2fd8cad414 (patch) | |
| tree | 8149dd2b4751ee68bf22c68c231ba45837f1a668 | |
| parent | f7c2d45fba037b33434d613b2afced47f40f6738 (diff) | |
| download | puzzles-2aa5708bc725cb48a0d6629dc97bad2fd8cad414.zip puzzles-2aa5708bc725cb48a0d6629dc97bad2fd8cad414.tar.gz puzzles-2aa5708bc725cb48a0d6629dc97bad2fd8cad414.tar.bz2 puzzles-2aa5708bc725cb48a0d6629dc97bad2fd8cad414.tar.xz | |
Rectangles: use new move_cursor() features
| -rw-r--r-- | rect.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -2415,11 +2415,11 @@ static char *interpret_move(const game_state *from, game_ui *ui, enddrag = true; erasing = (button == RIGHT_RELEASE); } else if (IS_CURSOR_MOVE(button)) { - move_cursor(button, &ui->cur_x, &ui->cur_y, from->w, from->h, false, - NULL); - ui->cur_visible = true; + char *ret; + ret = move_cursor(button, &ui->cur_x, &ui->cur_y, from->w, from->h, + false, &ui->cur_visible); active = true; - if (!ui->cur_dragging) return MOVE_UI_UPDATE; + if (!ui->cur_dragging || ret != MOVE_UI_UPDATE) return ret; coord_round((float)ui->cur_x + 0.5F, (float)ui->cur_y + 0.5F, &xc, &yc); } else if (IS_CURSOR_SELECT(button)) { if (ui->drag_start_x >= 0 && !ui->cur_dragging) { |