diff options
Diffstat (limited to 'towers.c')
| -rw-r--r-- | towers.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -1209,6 +1209,30 @@ static void free_ui(game_ui *ui) sfree(ui); } +static config_item *get_prefs(game_ui *ui) +{ + config_item *ret; + + ret = snewn(2, config_item); + + ret[0].name = "Puzzle appearance"; + ret[0].kw = "appearance"; + ret[0].type = C_CHOICES; + ret[0].u.choices.choicenames = ":2D:3D"; + ret[0].u.choices.choicekws = ":2d:3d"; + ret[0].u.choices.selected = ui->three_d; + + ret[1].name = NULL; + ret[1].type = C_END; + + return ret; +} + +static void set_prefs(game_ui *ui, const config_item *cfg) +{ + ui->three_d = cfg[0].u.choices.selected; +} + static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -2084,6 +2108,7 @@ const struct game thegame = { free_game, true, solve_game, true, game_can_format_as_text_now, game_text_format, + get_prefs, set_prefs, new_ui, free_ui, NULL, /* encode_ui */ |