added to_string functions
This commit is contained in:
parent
9c0f669874
commit
bfacd35cd8
1 changed files with 26 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
|||
use std::str::FromStr;
|
||||
|
||||
|
||||
#[derive(PartialEq, Debug, Clone, Copy)]
|
||||
pub enum SubScenes {
|
||||
|
@ -12,6 +14,20 @@ pub enum SubScenes {
|
|||
|
||||
}
|
||||
|
||||
impl SubScenes {
|
||||
pub fn to_string(&self) -> String {
|
||||
match self {
|
||||
SubScenes::CameraDefault => {String::from_str("Camera_Default").unwrap()},
|
||||
SubScenes::CameraWithUpperRight => {String::from_str("Camera_Top_Right").unwrap()},
|
||||
SubScenes::CameraWithLargeUpperRight => {String::from_str("Camera_Bottom_Left").unwrap()},
|
||||
SubScenes::CameraWithLowerRight => {String::from_str("Camera_Bottom_Right").unwrap()},
|
||||
SubScenes::ScreenDefault => {String::from_str("Screen_Default").unwrap()},
|
||||
SubScenes::ScreenWithUpperRight => {String::from_str("Screen_Top_Right").unwrap()},
|
||||
SubScenes::ScreenWithLowerRight => {String::from_str("Screen_Bottom_Right").unwrap()},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Debug, Clone, Copy)]
|
||||
pub enum Scenes {
|
||||
Camera,
|
||||
|
@ -19,3 +35,13 @@ pub enum Scenes {
|
|||
Augmented
|
||||
}
|
||||
|
||||
impl Scenes {
|
||||
pub fn to_string(&self) -> String {
|
||||
match self {
|
||||
Scenes::Camera => {String::from_str("Scene_Camera").unwrap()},
|
||||
Scenes::Screen => {String::from_str("Scene_Screen").unwrap()},
|
||||
Scenes::Augmented => {String::from_str("Augmented").unwrap()},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue