wip: unified focus system

This commit is contained in:
🪞👃🪞 2024-08-24 00:27:24 +03:00
parent 8b59658015
commit 3a7aa9e9a3
10 changed files with 194 additions and 123 deletions

View file

@ -15,25 +15,19 @@ pub struct Arranger {
pub selected: ArrangerFocus,
/// Display mode of arranger
pub mode: ArrangerViewMode,
pub focused: bool,
pub entered: bool,
pub focus_sequencer: bool,
/// Slot for modal dialog displayed on top of app.
pub modal: Option<Box<dyn ExitableComponent>>,
}
impl Arranger {
pub fn new (name: &str) -> Self {
Self {
name: Arc::new(RwLock::new(name.into())),
mode: ArrangerViewMode::VerticalCompact2,
selected: ArrangerFocus::Clip(0, 0),
scenes: vec![],
tracks: vec![],
entered: true,
focused: true,
focus_sequencer: false,
modal: None
name: Arc::new(RwLock::new(name.into())),
mode: ArrangerViewMode::VerticalCompact2,
selected: ArrangerFocus::Clip(0, 0),
scenes: vec![],
tracks: vec![],
modal: None
}
}
pub fn activate (&mut self) {