mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
parent
958e602577
commit
baad8254a2
3 changed files with 55 additions and 16 deletions
|
|
@ -13,26 +13,26 @@ impl Arrangement {
|
|||
Bsp::w(Fixed::x(4, button_2("I", "+", false)),
|
||||
Stack::east(move|add: &mut dyn FnMut(&dyn Render<TuiOut>)|{
|
||||
for (index, track, x1, x2) in self.tracks_with_sizes() {
|
||||
add(&Align::w(row!(
|
||||
add(&Tui::bg(track.color.dark.rgb, Align::w(Fixed::x(track.width as u16, row!(
|
||||
Either(track.sequencer.monitoring, Tui::fg(Green, "mon "), "mon "),
|
||||
Either(track.sequencer.recording, Tui::fg(Red, "rec "), "rec "),
|
||||
Either(track.sequencer.overdub, Tui::fg(Yellow, "dub "), "dub "),
|
||||
)))
|
||||
)))))
|
||||
}
|
||||
})))));
|
||||
for (index, port) in self.midi_ins().iter().enumerate() {
|
||||
add(&Fixed::y(1,
|
||||
Bsp::e(Fixed::x(20, Align::w(format!(" ● i{index:02} {}", port.name()))),
|
||||
Bsp::w(Fixed::x(4, ()),
|
||||
Stack::east(move|add: &mut dyn FnMut(&dyn Render<TuiOut>)|{
|
||||
for (index, track, x1, x2) in self.tracks_with_sizes() {
|
||||
add(&Align::w(row!(
|
||||
Either(track.sequencer.monitoring, Tui::fg(Green, " ● "), " · "),
|
||||
Either(track.sequencer.recording, Tui::fg(Red, " ● "), " · "),
|
||||
Either(track.sequencer.overdub, Tui::fg(Yellow, " ● "), " · "),
|
||||
)))
|
||||
}
|
||||
})))));
|
||||
add(&Fixed::y(1, Bsp::e(
|
||||
Fixed::x(20, Align::w(Bsp::e(" ● ", Tui::bold(true, Tui::fg(Rgb(255,255,255),port.name()))))),
|
||||
Bsp::w(Fixed::x(4, ()),
|
||||
Stack::east(move|add: &mut dyn FnMut(&dyn Render<TuiOut>)|{
|
||||
for (index, track, x1, x2) in self.tracks_with_sizes() {
|
||||
add(&Tui::bg(track.color.darker.rgb, Align::w(Fixed::x(track.width as u16, row!(
|
||||
Either(track.sequencer.monitoring, Tui::fg(Green, " ● "), " · "),
|
||||
Either(track.sequencer.recording, Tui::fg(Red, " ● "), " · "),
|
||||
Either(track.sequencer.overdub, Tui::fg(Yellow, " ● "), " · "),
|
||||
)))))
|
||||
}
|
||||
})))));
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -47,7 +47,7 @@ impl Arrangement {
|
|||
Fixed::y(h - 1, Fill::xy(Align::nw(Stack::south(|add: &mut dyn FnMut(&dyn Render<TuiOut>)|{
|
||||
for (index, port) in self.midi_outs().iter().enumerate() {
|
||||
add(&Fixed::y(1,Fill::x(Bsp::e(
|
||||
Align::w(Bsp::e(format!(" ● o{index:02} "), Tui::fg(Rgb(255,255,255),Tui::bold(true, port.name())))),
|
||||
Align::w(Bsp::e(" ● ", Tui::fg(Rgb(255,255,255),Tui::bold(true, port.name())))),
|
||||
Fill::x(Align::e(format!("{}/{} ",
|
||||
port.port().get_connections().len(),
|
||||
port.conn().len())))))));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue