Patch from James H to centralise some generally useful cursor-

handling functionality into misc.c.

[originally from svn r8176]
This commit is contained in:
Simon Tatham
2008-09-13 18:26:53 +00:00
parent fe1b91ac49
commit 5ead207060
7 changed files with 112 additions and 12 deletions

View File

@ -758,8 +758,7 @@ static char *interpret_move(game_state *from, game_ui *ui, game_drawstate *ds,
if (button == CURSOR_LEFT && ui->peg_cur > 0)
ui->peg_cur--;
ret = "";
} else if (button == CURSOR_SELECT || button == ' ' || button == '\r' ||
button == '\n') {
} else if (IS_CURSOR_SELECT(button)) {
ui->display_cur = 1;
if (ui->peg_cur == from->params.npegs) {
ret = encode_move(from, ui);