aboutsummaryrefslogtreecommitdiff
path: root/slant.c
diff options
context:
space:
mode:
authorJonas Kölker <jonaskoelker@yahoo.com>2015-09-21 18:34:53 +0200
committerSimon Tatham <anakin@pobox.com>2015-10-03 16:59:04 +0100
commit11a394f69b43ce36e4b0119699a4ae9461d252ee (patch)
tree1dee62ad807c2f52394ddf55bca32b0aca9d871f /slant.c
parentebf31f52b0dae356c7ad515b3e2e66672bd69a4e (diff)
downloadpuzzles-11a394f69b43ce36e4b0119699a4ae9461d252ee.zip
puzzles-11a394f69b43ce36e4b0119699a4ae9461d252ee.tar.gz
puzzles-11a394f69b43ce36e4b0119699a4ae9461d252ee.tar.bz2
puzzles-11a394f69b43ce36e4b0119699a4ae9461d252ee.tar.xz
Add more keyboard controls to Slant.
Diffstat (limited to 'slant.c')
-rw-r--r--slant.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/slant.c b/slant.c
index 6210d01..a7a3792 100644
--- a/slant.c
+++ b/slant.c
@@ -1719,6 +1719,11 @@ static char *interpret_move(const game_state *state, game_ui *ui,
move_cursor(button, &ui->cur_x, &ui->cur_y, w, h, 0);
ui->cur_visible = 1;
return "";
+ } else if (button == '\\' || button == '\b' || button == '/') {
+ int x = ui->cur_x, y = ui->cur_y;
+ if (button == ("\\" "\b" "/")[state->soln[y*w + x] + 1]) return NULL;
+ sprintf(buf, "%c%d,%d", button == '\b' ? 'C' : button, x, y);
+ return dupstr(buf);
}
if (action != NONE) {