mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
add some status bar modes
This commit is contained in:
parent
97af45b576
commit
794460b2e4
2 changed files with 17 additions and 2 deletions
|
|
@ -118,7 +118,7 @@ impl<E: Engine> Arranger<E> {
|
|||
let mut app = Self {
|
||||
focus_cursor: (0, 1),
|
||||
editor: PhraseEditor::new(),
|
||||
status: ArrangerStatusBar::Transport,
|
||||
status: ArrangerStatusBar::ArrangementClip,
|
||||
transport,
|
||||
arrangement,
|
||||
phrases,
|
||||
|
|
@ -180,6 +180,12 @@ impl<E: Engine> FocusGrid<ArrangerFocus> for Arranger<E> {
|
|||
focused == ArrangerFocus::PhrasePool;
|
||||
self.editor.focused =
|
||||
focused == ArrangerFocus::PhraseEditor;
|
||||
self.status = match focused {
|
||||
ArrangerFocus::Transport => ArrangerStatusBar::Transport,
|
||||
ArrangerFocus::Arrangement => ArrangerStatusBar::ArrangementMix,
|
||||
ArrangerFocus::PhrasePool => ArrangerStatusBar::PhrasePool,
|
||||
ArrangerFocus::PhraseEditor => ArrangerStatusBar::PhraseEditor,
|
||||
}
|
||||
}
|
||||
}
|
||||
/// General methods for arrangement
|
||||
|
|
|
|||
|
|
@ -25,7 +25,16 @@ impl Content for Arranger<Tui> {
|
|||
impl Content for ArrangerStatusBar {
|
||||
type Engine = Tui;
|
||||
fn content (&self) -> impl Widget<Engine = Tui> {
|
||||
"status bar"
|
||||
let label = match self {
|
||||
Self::Transport => "Transport",
|
||||
Self::ArrangementMix => "Arrangement",
|
||||
Self::ArrangementTrack => "Track",
|
||||
Self::ArrangementScene => "Scene",
|
||||
Self::ArrangementClip => "Clip",
|
||||
Self::PhrasePool => "Phrases",
|
||||
Self::PhraseEditor => "Sequencer",
|
||||
};
|
||||
TuiStyle::bg(format!(" {label} "), Color::Rgb(150, 160, 90)).fg(Color::Rgb(0, 0, 0))
|
||||
}
|
||||
}
|
||||
impl Content for Arrangement<Tui> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue