allow adding scenes
Some checks are pending
/ build (push) Waiting to run

This commit is contained in:
i do not exist 2026-08-12 20:58:59 +03:00
parent da2099c52e
commit d9e17cd348
2 changed files with 49 additions and 36 deletions

View file

@ -83,19 +83,19 @@ pub trait SceneController: HasScene
+ Namespace<Arc<str>>
+ Namespace<ItemTheme>
{
#[command(SetSize = "scene/size")]
#[command(SetSize = "size")]
fn scene_set_size (&mut self, _size: usize) -> Perhaps<SceneCommand>
where Self: Namespace<usize>
{
todo!()
}
#[command(SetZoom = "scene/zoom")]
#[command(SetZoom = "zoom")]
fn scene_set_zoom (&mut self, _size: usize) -> Perhaps<SceneCommand>
where Self: Namespace<usize>
{
todo!()
}
#[command(SetName = "scene/name")]
#[command(SetName = "name")]
fn scene_set_name (&mut self, name: Arc<str>) -> Perhaps<SceneCommand>
where Self: Namespace<Arc<str>>
{
@ -105,7 +105,7 @@ pub trait SceneController: HasScene
|name|SceneCommand::SetName { name }
)).transpose()?.flatten())
}
#[command(SetColor = "scene/color")]
#[command(SetColor = "color")]
fn scene_set_color (&mut self, color: ItemTheme) -> Perhaps<SceneCommand>
where Self: Namespace<ItemTheme>
{
@ -171,6 +171,9 @@ pub trait HasScenes: AsRef<Vec<Scene>> + AsMut<Vec<Scene>> {
}
impl<T: HasScenes
+ HasTracks
+ HasTrackScroll
+ HasJack<'static>
+ Namespace<usize>
+ Namespace<Option<ItemTheme>>
+ Namespace<Option<Arc<str>>>
@ -178,10 +181,20 @@ impl<T: HasScenes
#[tek_proc::commands(ScenesCommand)]
pub trait ScenesController: HasScenes
+ HasTracks
+ HasTrackScroll
+ HasJack<'static>
+ Namespace<usize>
+ Namespace<Option<ItemTheme>>
+ Namespace<Option<Arc<str>>>
{
#[command(Add = "add")]
fn scenes_add (&mut self) -> Perhaps<ScenesCommand>
where Self: HasScenes + HasJack<'static>
{
let (_index, _) = self.scenes_add_one(None, None)?;
Ok(None)
}
// TODO
}

View file

@ -56,15 +56,15 @@
(keys :launch (@q launch))
(keys :scenes (@s (select :select/scene))
(@shift/S (scenes add))
(@up (select :select/scene/dec))
(@down (select :select/scene/inc)))
(keys :scenes (@shift/S (scenes add))
(@s (select scene))
(@up (select scene-dec))
(@down (select scene-inc)))
(keys :tracks (@t (select :select/track))
(@shift/T (tracks add))
(@left (select :select/track/dec))
(@right (select :select/track/inc)))
(keys :tracks (@shift/T (tracks add))
(@t (select track))
(@left (select track-dec))
(@right (select track-inc)))
(keys :global (see :history :saveload)
(@f8 dialog :options)