aboutsummaryrefslogtreecommitdiff
path: root/flood.c
diff options
context:
space:
mode:
Diffstat (limited to 'flood.c')
-rw-r--r--flood.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/flood.c b/flood.c
index 3d7eaa2..80f2ff6 100644
--- a/flood.c
+++ b/flood.c
@@ -793,6 +793,18 @@ static void game_changed_state(game_ui *ui, const game_state *oldstate,
{
}
+static const char *current_key_label(const game_ui *ui,
+ const game_state *state, int button)
+{
+ if (button == CURSOR_SELECT &&
+ state->grid[0] != state->grid[ui->cy*state->w+ui->cx])
+ return "Fill";
+ if (button == CURSOR_SELECT2 &&
+ state->soln && state->solnpos < state->soln->nmoves)
+ return "Advance";
+ return "";
+}
+
struct game_drawstate {
bool started;
int tilesize;
@@ -1357,6 +1369,7 @@ const struct game thegame = {
decode_ui,
NULL, /* game_request_keys */
game_changed_state,
+ current_key_label,
interpret_move,
execute_move,
PREFERRED_TILESIZE, game_compute_size, game_set_size,