aboutsummaryrefslogtreecommitdiff
path: root/slant.c
diff options
context:
space:
mode:
Diffstat (limited to 'slant.c')
-rw-r--r--slant.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/slant.c b/slant.c
index ee39d74..77fec1e 100644
--- a/slant.c
+++ b/slant.c
@@ -1617,6 +1617,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 = "Mouse button order";
+ ret[0].kw = "left-button";
+ ret[0].type = C_CHOICES;
+ ret[0].u.choices.choicenames = ":Left \\, right /:Left /, right \\";
+ ret[0].u.choices.choicekws = ":\\:/";
+ ret[0].u.choices.selected = ui->swap_buttons;
+
+ ret[1].name = NULL;
+ ret[1].type = C_END;
+
+ return ret;
+}
+
+static void set_prefs(game_ui *ui, const config_item *cfg)
+{
+ ui->swap_buttons = cfg[0].u.choices.selected;
+}
+
static void free_ui(game_ui *ui)
{
sfree(ui);
@@ -2204,6 +2228,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 */