|
|
|
@ -46,7 +46,7 @@ pub mod constants {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// The `EngineOptionType` type used to indicate what type of option the GUI should display
|
|
|
|
|
#[derive(Clone, Debug, PartialEq)] |
|
|
|
|
#[derive(Copy, Clone, Debug, PartialEq)] |
|
|
|
|
pub enum EngineOptionType { |
|
|
|
|
Check, |
|
|
|
|
Spin, |
|
|
|
@ -64,7 +64,7 @@ pub enum EngineOptionData {
|
|
|
|
|
Text(String), |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#[derive(Debug, Hash, PartialEq)] |
|
|
|
|
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] |
|
|
|
|
/// The `EngineOptionDataType` type used to indicate the type of the `EngineOption` setting
|
|
|
|
|
pub enum EngineOptionDataType { |
|
|
|
|
DefaultVal, // `Default` is reserved so `DefaultVal` is used
|
|
|
|
@ -86,7 +86,7 @@ impl EngineOption {
|
|
|
|
|
/// Constructs a new EngineOption of type T
|
|
|
|
|
pub fn new(name: &'static str, option_type: EngineOptionType, |
|
|
|
|
option_data: HashMap<EngineOptionDataType, EngineOptionData>) -> EngineOption { |
|
|
|
|
EngineOption { name, option_type, option_data } |
|
|
|
|
EngineOption { name, option_type, option_data, } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
pub fn option_string(&self) -> String { |
|
|
|
|