1234567891011121314151617181920212223242526272829303132333435363738 |
- use std::collections::BTreeMap;
- pub enum SettingType {
- Slider{ min: isize, max: isize },
- String,
- Check,
- }
- pub enum SettingValue {
- Slider(isize),
- String(String),
- Check(bool)
- }
- pub struct Setting {
- pub name: String,
- pub setting_type: SettingType,
- pub default: SettingValue,
- }
- pub struct Configuration {
- pub settings: BTreeMap<String, (Setting, SettingValue)>,
- }
- impl Configuration {
- pub fn new() -> Self {
- Configuration {
- settings: BTreeMap::new()
- }
- }
- pub fn get_setting(_name: &str) {
-
- }
- }
|