This commit is contained in:
🪞👃🪞 2024-06-29 15:44:50 +03:00
parent e13569df93
commit 2432f27e8c
3 changed files with 11 additions and 6 deletions

View file

@ -173,6 +173,7 @@ pub fn process (state: &mut Launcher, _: &Client, _: &ProcessScope) -> Control {
}
pub fn render (state: &Launcher, buf: &mut Buffer, area: Rect) -> Usually<Rect> {
let Rect { x, y, width, height } = area;
let width = 80;
crate::device::sequencer::draw_play_stop(buf, x + 1, y, &state.playing);
crate::device::sequencer::draw_rec(buf, x + 12, y, state.recording);
crate::device::sequencer::draw_mon(buf, x + 19, y, state.monitoring);
@ -184,10 +185,10 @@ pub fn render (state: &Launcher, buf: &mut Buffer, area: Rect) -> Usually<Rect>
//separator.blit(buf, x, y + 41, Some(Style::default().dim()));
let mut y = y + 1;
y = y + LauncherGridView::new(
state, buf, Rect { x, y, width, height: 22 }, state.view.is_tracks()
state, buf, Rect { x, y, width, height: 8 }, state.view.is_tracks()
).draw()?.height;
y = y + draw_section_sequencer(state, buf, Rect { x, y, width, height: 28 })?.height;
y = y + draw_section_chains(state, buf, Rect { x, y, width, height: 21 })?.height;
y = y + draw_section_sequencer(state, buf, Rect { x, y, width, height: 8 })?.height;
y = y + draw_section_chains(state, buf, Rect { x, y, width, height: 8 })?.height;
if state.show_help {
let style = Some(Style::default().bold().white().not_dim().on_black().italic());
let hide = "[Left Right] Track [Up Down] Scene [, .] Value [F1] Toggle help ";
@ -292,6 +293,10 @@ fn draw_section_chains (state: &Launcher, buf: &mut Buffer, area: Rect) -> Usual
},
_ => {},
};
draw_highlight(buf, &Some(area), match state.view {
LauncherView::Chains => Style::default().green().dim(),
_ => Style::default().dim()
});
if let Some(chain) = &chain {
if let Some(plugin) = plugins.get(chain.focus) {
draw_highlight(buf, &Some(*plugin), match state.view {