diff --git a/src/config/config.rs b/src/config/config.rs index ee86c15..7bec4a0 100644 --- a/src/config/config.rs +++ b/src/config/config.rs @@ -1,8 +1,15 @@ use std::{path::PathBuf, marker::PhantomData}; +use crate::music_storage::library::MusicLibrary; + +#[derive(Debug, Default)] +struct ConfigLibrary { + name: String, + path: PathBuf, +} #[derive(Debug, Default)] pub struct Config { - db_path: Option, + libraries: Vec } impl Config { diff --git a/src/config/other_settings.rs b/src/config/other_settings.rs index c1940a4..da94670 100644 --- a/src/config/other_settings.rs +++ b/src/config/other_settings.rs @@ -2,78 +2,20 @@ use std::{marker::PhantomData, fs::File, path::PathBuf}; use font::Font; -pub trait Setting {} +pub enum Setting { + String { + name: String, + value: String + }, + Int { + name: String, + value: i32 + }, + Bool { + name: String, + value: bool + }, -pub struct DropDown { - name: String, - //value: ??? -} -impl Setting for DropDown {} - -#[derive(Debug, Default)] -pub struct Slider { - name: String, - value: i32, -} -impl Setting for Slider {} - -#[derive(Debug, Default)] -pub struct CheckBox { - name: String, - value: bool, -} -impl Setting for CheckBox {} - -enum TextBoxSize { - Small, - Large, -} -#[derive(Debug, Default)] -pub struct TextBox { - name: String, - text: String, - size: PhantomData -} -impl Setting for TextBox {} - -#[derive(Debug, Default)] -pub struct SingleSelect { - name: String, - value: bool, -} -impl Setting for SingleSelect {} - -#[derive(Debug, Default)] -pub struct MultiSelect { - name: String, - value: bool, -} -impl Setting for MultiSelect {} - -#[derive(Debug, Default)] -pub struct ConfigCounter { - name: String, - value: i32, -} -impl Setting for ConfigCounter {} - -#[derive(Debug, Default)] -pub struct ConfigFont { - name: String, - value: Font, -} -impl Setting for ConfigFont {} - -#[derive(Debug, Default)] -pub struct ConfigFile { - name: String, - value: PathBuf, -} -impl Setting for ConfigFile {} - -#[derive(Debug, Default)] -pub struct List { - items: Vec } pub struct Form {