gled 2.6.2

gled is an application for creating animations and effects on artnet or wled light installations
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::scene_instance_path::SceneInstancePath;

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum RenderDeactivatedScenes {
    Always,
    Some(SceneInstancePath, SceneInstancePath),
}

impl RenderDeactivatedScenes {
    pub fn should_render(&self, path: SceneInstancePath) -> bool {
        match self {
            RenderDeactivatedScenes::Always => true,
            RenderDeactivatedScenes::Some(selected, hovered) => {
                *selected == path || *hovered == path
            }
        }
    }
}