diff options
| author | Simon Tatham <anakin@pobox.com> | 2007-02-28 21:19:15 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2007-02-28 21:19:15 +0000 |
| commit | 9287d95d0810e6fc76625aa270ecdff297934c55 (patch) | |
| tree | d3d43a32a15410a08e1df3b866ac3f56e8b3ad21 /pattern.c | |
| parent | de5ccc9352d0156600c0ed1e87daac28015e8c01 (diff) | |
| download | puzzles-9287d95d0810e6fc76625aa270ecdff297934c55.zip puzzles-9287d95d0810e6fc76625aa270ecdff297934c55.tar.gz puzzles-9287d95d0810e6fc76625aa270ecdff297934c55.tar.bz2 puzzles-9287d95d0810e6fc76625aa270ecdff297934c55.tar.xz | |
General cleanups patch from James H:
- missing static in filling.c
- better robustness in execute_move() in filling.c
- remove side effects in assert statements
- remove rogue diagnostic in galaxies.c
- remove // comment in map.c
- add more stylus-friendly UI to Pattern
- bias Unequal towards generating inequality clues rather than numeric
[originally from svn r7344]
Diffstat (limited to 'pattern.c')
| -rw-r--r-- | pattern.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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; |