const game_drawstate *ds,
int x, int y, int button)
{
+ int control = button & MOD_CTRL, shift = button & MOD_SHFT;
button &= ~MOD_MASK;
x = FROMCOORD(state->w, x);
}
if (IS_CURSOR_MOVE(button)) {
+ int x = ui->cur_x, y = ui->cur_y, newstate;
+ char buf[80];
move_cursor(button, &ui->cur_x, &ui->cur_y, state->w, state->h, 0);
ui->cur_visible = 1;
- return "";
+ if (!control && !shift) return "";
+
+ newstate = control ? shift ? GRID_UNKNOWN : GRID_FULL : GRID_EMPTY;
+ if (state->grid[y * state->w + x] == newstate &&
+ state->grid[ui->cur_y * state->w + ui->cur_x] == newstate)
+ return "";
+
+ sprintf(buf, "%c%d,%d,%d,%d", control ? shift ? 'U' : 'F' : 'E',
+ min(x, ui->cur_x), min(y, ui->cur_y),
+ abs(x - ui->cur_x) + 1, abs(y - ui->cur_y) + 1);
+ return dupstr(buf);
}
+
if (IS_CURSOR_SELECT(button)) {
int currstate = state->grid[ui->cur_y * state->w + ui->cur_x];
int newstate;
return key will cycle the current cell through empty, then black, then
white, then empty, and the space bar does the same cycle in reverse.
+Moving the cursor while holding Control will colour the moved-over
+squares black. Holding Shift will colour the moved-over squares
+white, and holding both will colour them grey.
+
(All the actions described in \k{common-actions} are also available.)
\H{pattern-parameters} \I{parameters, for Pattern}Pattern parameters