12345678910111213141516171819202122232425262728293031323334353637383940 |
- 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 {
- settings: BTreeMap<String, (Setting, SettingValue)>,
- }
- impl Configuration {
- pub fn new() -> Self {
- Configuration {
- settings: BTreeMap::new()
- }
- }
- pub fn get_setting(name: &str) {
-
- }
- }
|