wip: new old arranger scenes
Some checks are pending
/ build (push) Waiting to run

This commit is contained in:
🪞👃🪞 2025-05-15 23:06:15 +03:00
parent 4ba88bfd6d
commit 9aeb792f7d
6 changed files with 197 additions and 176 deletions

View file

@ -104,6 +104,9 @@ impl App {
pub fn view_arranger (&self) -> impl Content<TuiOut> + use<'_> {
ArrangerView::new(&self.project, self.editor.as_ref())
}
pub fn view_arranger_scenes (&self) -> impl Content<TuiOut> + use<'_> {
self.scenes_view(&self.editor)
}
pub fn view_arranger_scene_names <'a> (&'a self) -> impl Content<TuiOut> + use<'a> {
let h = self.project.scenes.len() as u16 * 2;
let bg = self.color.darker.rgb;
@ -352,6 +355,33 @@ impl App {
}
}
impl ArrangerSceneRows for App {
fn arrangement (&self) -> &Arrangement {
self.project
}
fn scenes_height (&self) -> u16 {
self.project.scenes_height
}
fn width_side (&self) -> u16 {
20
}
fn width_mid (&self) -> u16 {
self.width().saturating_sub(self.width_side() * 2)
}
fn scene_selected (&self) -> Option<usize> {
self.project.selection.scene()
}
fn scene_last (&self) -> usize {
self.project.scenes.len().saturating_sub(1)
}
fn track_selected (&self) -> Option<usize> {
self.project.selection.track()
}
fn is_editing (&self) -> bool {
self.is_editing
}
}
pub(crate) fn heading <'a> (
key: &'a str,
label: &'a str,