From b183d821b6fcba1a4f0f6dab4e60689eda049d03 Mon Sep 17 00:00:00 2001 From: Nickiel12 <35903114+Nickiel12@users.noreply.github.com> Date: Thu, 30 Dec 2021 11:22:29 -0800 Subject: [PATCH] added get_type --- src/modules/stream_states/enums.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/modules/stream_states/enums.rs b/src/modules/stream_states/enums.rs index d7ceeb8..c62d47f 100644 --- a/src/modules/stream_states/enums.rs +++ b/src/modules/stream_states/enums.rs @@ -26,6 +26,19 @@ impl SubScenes { 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)]