|
@@ -0,0 +1,40 @@
|
|
|
+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) {
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|