mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
This commit is contained in:
parent
4ba88bfd6d
commit
9aeb792f7d
6 changed files with 197 additions and 176 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue