diff options
Diffstat (limited to 'filling.c')
| -rw-r--r-- | filling.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -1429,6 +1429,23 @@ static void game_changed_state(game_ui *ui, const game_state *oldstate, ui->keydragging = false; } +static const char *current_key_label(const game_ui *ui, + const game_state *state, int button) +{ + const int w = state->shared->params.w; + + if (IS_CURSOR_SELECT(button) && ui->cur_visible) { + if (button == CURSOR_SELECT) { + if (ui->keydragging) return "Stop"; + return "Multiselect"; + } + if (button == CURSOR_SELECT2 && + !state->shared->clues[w*ui->cur_y + ui->cur_x]) + return (ui->sel[w*ui->cur_y + ui->cur_x]) ? "Deselect" : "Select"; + } + return ""; +} + #define PREFERRED_TILE_SIZE 32 #define TILE_SIZE (ds->tilesize) #define BORDER (TILE_SIZE / 2) @@ -2166,6 +2183,7 @@ const struct game thegame = { decode_ui, game_request_keys, game_changed_state, + current_key_label, interpret_move, execute_move, PREFERRED_TILE_SIZE, game_compute_size, game_set_size, |