diff options
Diffstat (limited to 'map.c')
| -rw-r--r-- | map.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -2333,6 +2333,30 @@ static game_ui *new_ui(const game_state *state) return ui; } +static config_item *get_prefs(game_ui *ui) +{ + config_item *ret; + + ret = snewn(2, config_item); + + ret[0].name = "Victory flash effect"; + ret[0].kw = "flash-type"; + ret[0].type = C_CHOICES; + ret[0].u.choices.choicenames = ":Cyclic:Each to white:All to white"; + ret[0].u.choices.choicekws = ":cyclic:each-white:all-white"; + ret[0].u.choices.selected = ui->flash_type; + + ret[1].name = NULL; + ret[1].type = C_END; + + return ret; +} + +static void set_prefs(game_ui *ui, const config_item *cfg) +{ + ui->flash_type = cfg[0].u.choices.selected; +} + static void free_ui(game_ui *ui) { sfree(ui); @@ -3291,6 +3315,7 @@ const struct game thegame = { free_game, true, solve_game, false, NULL, NULL, /* can_format_as_text_now, text_format */ + get_prefs, set_prefs, new_ui, free_ui, NULL, /* encode_ui */ |