X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/750037d76de7c1ab5d46aaf8a712f32599e7d563..c5e949657127f3c752cdc693cb71636711d9ecb1:/pattern.c diff --git a/pattern.c b/pattern.c index a85877f..740f434 100644 --- a/pattern.c +++ b/pattern.c @@ -789,17 +789,28 @@ static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds, if (x >= 0 && x < state->w && y >= 0 && y < state->h && (button == LEFT_BUTTON || button == RIGHT_BUTTON || button == MIDDLE_BUTTON)) { +#ifdef STYLUS_BASED + int currstate = state->grid[y * state->w + x]; +#endif ui->dragging = TRUE; if (button == LEFT_BUTTON) { ui->drag = LEFT_DRAG; ui->release = LEFT_RELEASE; +#ifdef STYLUS_BASED + ui->state = currstate == GRID_FULL ? GRID_UNKNOWN : GRID_FULL; +#else ui->state = GRID_FULL; +#endif } else if (button == RIGHT_BUTTON) { ui->drag = RIGHT_DRAG; ui->release = RIGHT_RELEASE; +#ifdef STYLUS_BASED + ui->state = currstate == GRID_EMPTY ? GRID_UNKNOWN : GRID_EMPTY; +#else ui->state = GRID_EMPTY; +#endif } else /* if (button == MIDDLE_BUTTON) */ { ui->drag = MIDDLE_DRAG; ui->release = MIDDLE_RELEASE; @@ -1276,7 +1287,7 @@ const struct game thegame = { TRUE, FALSE, game_print_size, game_print, FALSE, /* wants_statusbar */ FALSE, game_timing_state, - 0, /* flags */ + REQUIRE_RBUTTON, /* flags */ }; #ifdef STANDALONE_SOLVER