added get_type

This commit is contained in:
Nickiel12 2021-12-30 11:22:29 -08:00
parent fe23550f87
commit b183d821b6

View file

@ -26,6 +26,19 @@ impl SubScenes {
SubScenes::ScreenWithLowerRight => {String::from_str("Screen_Bottom_Right").unwrap()}, SubScenes::ScreenWithLowerRight => {String::from_str("Screen_Bottom_Right").unwrap()},
} }
} }
pub fn get_type(&self) -> Scenes {
match self {
SubScenes::CameraDefault | SubScenes::CameraWithUpperRight |
SubScenes::CameraWithLargeUpperRight | SubScenes::CameraWithLowerRight => {
Scenes::Camera
}
SubScenes::ScreenDefault | SubScenes::ScreenWithUpperRight |
SubScenes::ScreenWithLowerRight => {
Scenes::Screen
}
}
}
} }
#[derive(PartialEq, Debug, Clone, Copy)] #[derive(PartialEq, Debug, Clone, Copy)]