Implement the options menu, part 1

This commit implements loading and saving options from/to config, and
enough UI toolkit magic to allow changes to boolean options to be
persisted.

We now respect the "play movies" setting and take screen resolution
from the config file.
This commit is contained in:
2020-03-22 22:12:59 +00:00
parent 0adbfaa573
commit 971b3178d6
9 changed files with 481 additions and 96 deletions

View File

@@ -1,7 +1,19 @@
[ordoor]
data_dir = "./orig"
video_player = [
"mpv",
"--no-config", "--keep-open=no", "--force-window=no", "--no-border",
"--no-osc", "--fullscreen", "--no-input-default-bindings"
]
data_dir = "./orig"
video_player = ["mpv", "--no-config", "--keep-open=no", "--force-window=no", "--no-border", "--no-osc", "--fullscreen", "--no-input-default-bindings"]
[options]
play_movies = true
animations = true
play_music = true
combat_voices = true
show_grid = false
show_paths = false
point_saving = false
auto_cut_level = false
x_resolution = 1280
y_resolution = 1024
music_volume = 100
sfx_volume = 100
unit_speed = 100
animation_speed = 100