-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
GUI based settings menu that derives off what is specified in config.template.toml, including the TOML comments and keyboard keybinds. To implement this we'll need to be able to parse the toml config and also parse the documentation embedded in the comments, this might require a custom written solution. Then this settings panel should be merged into the cirrus toolkit to be used in other applications.
- Macro to "stringify" a config struct's field (
&config.camera.resolution) to a string version (assert(&string, "config.camera.resolution")). - Init settings widget once and make
add_section()idempotent. - Parse the template config and it's comments.
- Limit max size of settings menu or widget.
- Find the toml docstring of the corresponding config key path.
- Create method in
Settingswidget (add_section()) to allow for construction of sections in the settings panel. - Get type of provided config variable to mutate in
add_section(). - Infer type of input widget in Settings widget when type of provided config variable is established.
- Allow developer to override settings section title and dropdown widget choices for certain types (check what else should be implemented to
SectionDisplayInfo). - Implement and render the rest of the section types.
- Show section despite config key not existing in template config.
- Implement combo box choices for other section types.
- Some sort of separate system that keeps the user's config.toml up to date with the config struct. Implement
ConfigManager#16 -
ConfigManager::update()should request for egui redraw to keep the auto save scheduler going when the app is not updating (e.g: the user stopped interacting with the window). -
CTRL + Sforce triggers the config manager to save to disk right away. - Leaving the settings menu will auto save.
- Finish implementation in Aeternum
- Finish Roseate implementation
Cirrus PR: #14
WIP screenshot from Aeternum
# config.template.toml
[misc]
# Folder located at:
# Linux: ~/.config/cloudy/aeternum/models
# Mac: ~/Library/Application Support/cloudy/aeternum/models
# Windows: %AppData%\cloudy\aeternum\models
enable_custom_folder = trueSettings::new(&self.config_template_string)
.add_section::<bool>(
Section::new(
config_key_path!(self.config.misc.enable_custom_folder),
&mut self.config.misc.enable_custom_folder,
SectionDisplayInfo::default()
).into()
)
.show(ctx, ui, &self.theme);Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request