From 11a394f69b43ce36e4b0119699a4ae9461d252ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20K=C3=B6lker?= Date: Mon, 21 Sep 2015 18:34:53 +0200 Subject: Add more keyboard controls to Slant. --- slant.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'slant.c') 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) { -- cgit v1.1