aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2023-08-11 00:59:30 +0100
committerBen Harris <bjh21@bjh21.me.uk>2023-08-13 16:44:24 +0100
commitf13fbf2285b1731dcc592f5a657dcbda2bbf3a02 (patch)
treefc8e07a0053e957a135003921440137fe2026a64
parenta0c7156fc8547fd0d6591413dea01462d003b847 (diff)
downloadpuzzles-f13fbf2285b1731dcc592f5a657dcbda2bbf3a02.zip
puzzles-f13fbf2285b1731dcc592f5a657dcbda2bbf3a02.tar.gz
puzzles-f13fbf2285b1731dcc592f5a657dcbda2bbf3a02.tar.bz2
puzzles-f13fbf2285b1731dcc592f5a657dcbda2bbf3a02.tar.xz
Singles: use new move_cursor() features
-rw-r--r--singles.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/singles.c b/singles.c
index 23b8a4c..172e0bf 100644
--- a/singles.c
+++ b/singles.c
@@ -1504,11 +1504,10 @@ static char *interpret_move(const game_state *state, game_ui *ui,
int i, x = FROMCOORD(mx), y = FROMCOORD(my);
enum { NONE, TOGGLE_BLACK, TOGGLE_CIRCLE, UI } action = NONE;
- if (IS_CURSOR_MOVE(button)) {
- move_cursor(button, &ui->cx, &ui->cy, state->w, state->h, true, NULL);
- ui->cshow = true;
- action = UI;
- } else if (IS_CURSOR_SELECT(button)) {
+ if (IS_CURSOR_MOVE(button))
+ return move_cursor(button, &ui->cx, &ui->cy, state->w, state->h, true,
+ &ui->cshow);
+ else if (IS_CURSOR_SELECT(button)) {
x = ui->cx; y = ui->cy;
if (!ui->cshow) {
action = UI;