mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
improve various renderings
This commit is contained in:
parent
bf429cdbbe
commit
58433c0402
6 changed files with 119 additions and 74 deletions
|
|
@ -164,6 +164,7 @@ pub enum PortConnectName {
|
||||||
pub name: PortConnectName,
|
pub name: PortConnectName,
|
||||||
pub scope: PortConnectScope,
|
pub scope: PortConnectScope,
|
||||||
pub status: Arc<RwLock<Vec<(Port<Unowned>, Arc<str>, PortConnectStatus)>>>,
|
pub status: Arc<RwLock<Vec<(Port<Unowned>, Arc<str>, PortConnectStatus)>>>,
|
||||||
|
pub info: Arc<String>,
|
||||||
}
|
}
|
||||||
impl PortConnect {
|
impl PortConnect {
|
||||||
pub fn collect (exact: &[impl AsRef<str>], re: &[impl AsRef<str>], re_all: &[impl AsRef<str>])
|
pub fn collect (exact: &[impl AsRef<str>], re: &[impl AsRef<str>], re_all: &[impl AsRef<str>])
|
||||||
|
|
@ -177,16 +178,19 @@ impl PortConnect {
|
||||||
}
|
}
|
||||||
/// Connect to this exact port
|
/// Connect to this exact port
|
||||||
pub fn exact (name: impl AsRef<str>) -> Self {
|
pub fn exact (name: impl AsRef<str>) -> Self {
|
||||||
|
let info = format!("=:{}", name.as_ref()).into();
|
||||||
let name = Exact(name.as_ref().into());
|
let name = Exact(name.as_ref().into());
|
||||||
Self { name, scope: One, status: Arc::new(RwLock::new(vec![])) }
|
Self { name, scope: One, status: Arc::new(RwLock::new(vec![])), info }
|
||||||
}
|
}
|
||||||
pub fn regexp (name: impl AsRef<str>) -> Self {
|
pub fn regexp (name: impl AsRef<str>) -> Self {
|
||||||
|
let info = format!("~:{}", name.as_ref()).into();
|
||||||
let name = RegExp(name.as_ref().into());
|
let name = RegExp(name.as_ref().into());
|
||||||
Self { name, scope: One, status: Arc::new(RwLock::new(vec![])) }
|
Self { name, scope: One, status: Arc::new(RwLock::new(vec![])), info }
|
||||||
}
|
}
|
||||||
pub fn regexp_all (name: impl AsRef<str>) -> Self {
|
pub fn regexp_all (name: impl AsRef<str>) -> Self {
|
||||||
|
let info = format!("+:{}", name.as_ref()).into();
|
||||||
let name = RegExp(name.as_ref().into());
|
let name = RegExp(name.as_ref().into());
|
||||||
Self { name, scope: All, status: Arc::new(RwLock::new(vec![])) }
|
Self { name, scope: All, status: Arc::new(RwLock::new(vec![])), info }
|
||||||
}
|
}
|
||||||
pub fn info (&self) -> Arc<str> {
|
pub fn info (&self) -> Arc<str> {
|
||||||
let status = {
|
let status = {
|
||||||
|
|
|
||||||
|
|
@ -67,14 +67,14 @@ impl MidiPlayer {
|
||||||
jack: &Jack,
|
jack: &Jack,
|
||||||
clock: Option<&Clock>,
|
clock: Option<&Clock>,
|
||||||
clip: Option<&Arc<RwLock<MidiClip>>>,
|
clip: Option<&Arc<RwLock<MidiClip>>>,
|
||||||
midi_from: &[PortConnect],
|
_midi_from: &[PortConnect],
|
||||||
midi_to: &[PortConnect],
|
_midi_to: &[PortConnect],
|
||||||
) -> Usually<Self> {
|
) -> Usually<Self> {
|
||||||
let name = name.as_ref();
|
let name = name.as_ref();
|
||||||
let clock = clock.cloned().unwrap_or_default();
|
let clock = clock.cloned().unwrap_or_default();
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
midi_ins: vec![JackMidiIn::new(jack, format!("M/{name}"), midi_from)?,],
|
midi_ins: vec![],//JackMidiIn::new(jack, format!("M/{name}"), midi_from)?,],
|
||||||
midi_outs: vec![JackMidiOut::new(jack, format!("{name}/M"), midi_to)?, ],
|
midi_outs: vec![],//JackMidiOut::new(jack, format!("{name}/M"), midi_to)?, ],
|
||||||
play_clip: clip.map(|clip|(Moment::zero(&clock.timebase), Some(clip.clone()))),
|
play_clip: clip.map(|clip|(Moment::zero(&clock.timebase), Some(clip.clone()))),
|
||||||
clock,
|
clock,
|
||||||
note_buf: vec![0;8],
|
note_buf: vec![0;8],
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ impl Tek {
|
||||||
..Self::new_clock(jack, bpm, sync_lead, sync_follow, midi_froms, midi_tos)?
|
..Self::new_clock(jack, bpm, sync_lead, sync_follow, midi_froms, midi_tos)?
|
||||||
};
|
};
|
||||||
arranger.scenes_add(scenes);
|
arranger.scenes_add(scenes);
|
||||||
arranger.tracks_add(tracks, Some(track_width), midi_froms, midi_tos);
|
arranger.tracks_add(tracks, Some(track_width), &[], &[]);
|
||||||
arranger.selected = Selection::Clip(1, 1);
|
arranger.selected = Selection::Clip(1, 1);
|
||||||
Ok(arranger)
|
Ok(arranger)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
(@shift-u redo 1)
|
(@shift-u redo 1)
|
||||||
(@space clock toggle)
|
(@space clock toggle)
|
||||||
(@shift-space clock toggle 0)
|
(@shift-space clock toggle 0)
|
||||||
(@ctrl-a scene add)
|
|
||||||
(@ctrl-t track add)
|
|
||||||
(@t select :track 0)
|
(@t select :track 0)
|
||||||
(@tab edit :clip)
|
(@tab edit :clip)
|
||||||
(@c color)
|
(@c color)
|
||||||
(@shift-I input add)
|
(@shift-I input add)
|
||||||
(@shift-O output add)
|
(@shift-O output add)
|
||||||
|
(@shift-S scene add)
|
||||||
|
(@shift-T track add)
|
||||||
|
|
|
||||||
159
tek/src/view.rs
159
tek/src/view.rs
|
|
@ -192,11 +192,7 @@ impl Tek {
|
||||||
fn w (&self) -> u16 { self.size.w() as u16 }
|
fn w (&self) -> u16 { self.size.w() as u16 }
|
||||||
fn h (&self) -> u16 { self.size.h() as u16 }
|
fn h (&self) -> u16 { self.size.h() as u16 }
|
||||||
fn w_sidebar (&self) -> u16 {
|
fn w_sidebar (&self) -> u16 {
|
||||||
let w = self.w() / 10;
|
self.w() / if self.is_editing() { 16 } else { 8 } as u16
|
||||||
let w = w.min(if w > 80 { 20 } else if w > 70 { 18 } else if w > 60 { 16 }
|
|
||||||
else if w > 50 { 14 } else if w > 40 { 12 } else { 10 });
|
|
||||||
//let w = if self.is_editing() { w / 2 } else { w };
|
|
||||||
w as u16
|
|
||||||
}
|
}
|
||||||
fn w_tracks (&self, editing: bool, bigger: usize) -> u16 {
|
fn w_tracks (&self, editing: bool, bigger: usize) -> u16 {
|
||||||
self.tracks_sizes(editing, bigger).last().map(|(_, _, _, x)|x as u16).unwrap_or(0)
|
self.tracks_sizes(editing, bigger).last().map(|(_, _, _, x)|x as u16).unwrap_or(0)
|
||||||
|
|
@ -296,30 +292,59 @@ impl Tek {
|
||||||
let styled = Tui::fg_bg(track.color.lightest.rgb, track.color.base.rgb, content);
|
let styled = Tui::fg_bg(track.color.lightest.rgb, track.color.base.rgb, content);
|
||||||
map_east(x1 as u16, width, Fixed::x(width, styled)) }) }
|
map_east(x1 as u16, width, Fixed::x(width, styled)) }) }
|
||||||
fn io_heading <'a, T: PortsSizes<'a>> (
|
fn io_heading <'a, T: PortsSizes<'a>> (
|
||||||
&'a self,
|
&'a self, key: &'a str, label: &'a str, count: usize,
|
||||||
key: &'a str, label: &str, count: usize,
|
fg: Color, bg: Color, iter: impl Fn()->T + Send + Sync + 'a,
|
||||||
fg: Color, bg: Color,
|
|
||||||
iter: impl Fn()->T + Send + Sync + 'a,
|
|
||||||
) -> impl Content<TuiOut> + 'a {
|
) -> impl Content<TuiOut> + 'a {
|
||||||
self.heading(key, label, count, Map::new(iter,
|
self.heading(key, label, count, self.io_ports(fg, bg, iter))
|
||||||
|
}
|
||||||
|
fn io_ports <'a, T: PortsSizes<'a>> (
|
||||||
|
&'a self, fg: Color, bg: Color, iter: impl Fn()->T + Send + Sync + 'a
|
||||||
|
) -> impl Content<TuiOut> + 'a {
|
||||||
|
Map::new(iter,
|
||||||
move|(index, name, connections, y, y2), _|map_south(y as u16, (y2-y) as u16, Bsp::s(
|
move|(index, name, connections, y, y2), _|map_south(y as u16, (y2-y) as u16, Bsp::s(
|
||||||
Fill::x(Tui::bold(true, Tui::fg_bg(fg, bg, Align::w(Bsp::e(" ", name))))),
|
Fill::x(Tui::bold(true, Tui::fg_bg(fg, bg, Align::w(Bsp::e(" ", name))))),
|
||||||
Map::new(||connections.iter(), move|connect, index|map_south(index as u16, 1,
|
Map::new(||connections.iter(), move|connect, index|map_south(index as u16, 1,
|
||||||
Fill::x(Align::w(Tui::bold(false, Tui::fg_bg(fg, bg, connect.info())))))))))) }
|
Fill::x(Align::w(Tui::bold(false, Tui::fg_bg(fg, bg,
|
||||||
|
&connect.info[..(self.w_sidebar() as usize).min(connect.info.len())])))))))))}
|
||||||
|
fn io_connections <'a, T: PortsSizes<'a>> (
|
||||||
|
&'a self, fg: Color, bg: Color, iter: impl Fn()->T + Send + Sync + 'a
|
||||||
|
) -> impl Content<TuiOut> + 'a {
|
||||||
|
Map::new(iter,
|
||||||
|
move|(index, name, connections, y, y2), _|map_south(y as u16, (y2-y) as u16, Bsp::s(
|
||||||
|
Fill::x(Tui::bold(true, Self::wrap(bg, fg, Fill::x(Align::w("▞▞▞▞ ▞▞▞▞"))))),
|
||||||
|
Map::new(||connections.iter(), move|connect, index|map_south(index as u16, 1,
|
||||||
|
Fill::x(Align::w(Tui::bold(false, Self::wrap(bg, fg, Fill::x(""))))))))))}
|
||||||
fn heading <'a> (
|
fn heading <'a> (
|
||||||
&'a self, key: &'a str, label: &str, count: usize,
|
&'a self, key: &'a str, label: &'a str, count: usize,
|
||||||
content: impl Content<TuiOut> + Send + Sync + 'a
|
content: impl Content<TuiOut> + Send + Sync + 'a
|
||||||
) -> impl Content<TuiOut> + 'a {
|
) -> impl Content<TuiOut> + 'a {
|
||||||
Fill::xy(Align::nw(Bsp::s(
|
let count = format!("{count}");
|
||||||
self.button(key, format!("{:10} ({})", label, count)),
|
Fill::xy(Align::w(Bsp::s(Fill::x(Align::w(self.button3(key, label, count))), content)))
|
||||||
content))) }
|
}
|
||||||
fn button <'a, K: Content<TuiOut> + 'a, L: Content<TuiOut> + 'a> (&'a self, key: K, label: L)
|
fn button2 <'a, K, L> (&'a self, key: K, label: L) -> impl Content<TuiOut> + 'a
|
||||||
-> impl Content<TuiOut> + 'a
|
where K: Content<TuiOut> + 'a, L: Content<TuiOut> + 'a {
|
||||||
{
|
|
||||||
let compact = !self.is_editing();
|
|
||||||
Tui::bold(true, Bsp::e(
|
Tui::bold(true, Bsp::e(
|
||||||
Tui::fg_bg(Tui::g(0), Tui::orange(), Bsp::e(key, Tui::fg(Tui::g(96), "▐"))),
|
Tui::fg_bg(Tui::g(0), Tui::orange(), Bsp::e(key, Tui::fg(Tui::g(96), "▐"))),
|
||||||
When::new(compact, Margin::x(1, Tui::fg_bg(Tui::g(255), Tui::g(96), label))))) }
|
When::new(!self.is_editing(), Tui::fg_bg(Tui::g(255), Tui::g(96), label)))) }
|
||||||
|
fn button3 <'a, K, L, V> (&'a self, key: K, label: L, value: V) -> impl Content<TuiOut> + 'a
|
||||||
|
where K: Content<TuiOut> + 'a, L: Content<TuiOut> + 'a, V: Content<TuiOut> + 'a {
|
||||||
|
let editing = self.is_editing();
|
||||||
|
Tui::bold(true, Bsp::e(
|
||||||
|
Tui::fg_bg(Tui::g(0), Tui::orange(), Bsp::e(key, Tui::fg(if editing {
|
||||||
|
Tui::g(128)
|
||||||
|
} else {
|
||||||
|
Tui::g(96)
|
||||||
|
}, "▐"))),
|
||||||
|
Bsp::e(
|
||||||
|
When::new(!editing, Bsp::e(
|
||||||
|
Tui::fg_bg(Tui::g(255), Tui::g(96), label),
|
||||||
|
Tui::fg_bg(Tui::g(128), Tui::g(96), "▐"),
|
||||||
|
)),
|
||||||
|
Bsp::e(
|
||||||
|
Tui::fg_bg(Tui::g(224), Tui::g(128), value),
|
||||||
|
Tui::fg_bg(Tui::g(128), Reset, "▌"),
|
||||||
|
)
|
||||||
|
))) }
|
||||||
fn wrap (bg: Color, fg: Color, content: impl Content<TuiOut>) -> impl Content<TuiOut> {
|
fn wrap (bg: Color, fg: Color, content: impl Content<TuiOut>) -> impl Content<TuiOut> {
|
||||||
Bsp::e(Tui::fg_bg(bg, Reset, "▐"), Bsp::w(Tui::fg_bg(bg, Reset, "▌"),
|
Bsp::e(Tui::fg_bg(bg, Reset, "▐"), Bsp::w(Tui::fg_bg(bg, Reset, "▌"),
|
||||||
Tui::fg_bg(fg, bg, content))) }
|
Tui::fg_bg(fg, bg, content))) }
|
||||||
|
|
@ -344,74 +369,92 @@ impl Tek {
|
||||||
let data = (self.selected.track().unwrap_or(0), self.tracks().len());
|
let data = (self.selected.track().unwrap_or(0), self.tracks().len());
|
||||||
self.fmtd.write().unwrap().trks.update(Some(data),
|
self.fmtd.write().unwrap().trks.update(Some(data),
|
||||||
rewrite!(buf, "({}/{})", data.0, data.1));
|
rewrite!(buf, "({}/{})", data.0, data.1));
|
||||||
self.button(" T", Bsp::e("track ", self.fmtd.read().unwrap().trks.view.clone()))
|
self.button3(" T", "track", self.fmtd.read().unwrap().trks.view.clone())
|
||||||
}
|
}
|
||||||
|
|
||||||
// ACTIVE CLIPS ///////////////////////////////////////////////////////////////////////////////
|
// ACTIVE CLIPS ///////////////////////////////////////////////////////////////////////////////
|
||||||
fn view_clips_into (&self) -> impl Content<TuiOut> + use<'_> {
|
fn view_clips_into (&self) -> impl Content<TuiOut> + use<'_> {
|
||||||
let heading = "Into:";
|
let heading = Align::e("Into:");
|
||||||
let content = self.per_track_top(|_, _|" --- ");
|
let content = self.per_track_top(|_, _|Tui::bg(Reset, " --- "));
|
||||||
self.row_top(self.w(), 1, heading, content)
|
self.row_top(self.w(), 1, heading, content)
|
||||||
}
|
}
|
||||||
fn view_clips_from (&self) -> impl Content<TuiOut> + use<'_> {
|
fn view_clips_from (&self) -> impl Content<TuiOut> + use<'_> {
|
||||||
let heading = "From:";
|
let heading = Align::e("From:");
|
||||||
let content = self.per_track_top(|_, _|" --- ");
|
let content = self.per_track_top(|_, _|Tui::bg(Reset, " --- "));
|
||||||
self.row_top(self.w(), 1, heading, content)
|
self.row_top(self.w(), 1, heading, content)
|
||||||
}
|
}
|
||||||
fn view_clips_next (&self) -> impl Content<TuiOut> + use<'_> {
|
fn view_clips_next (&self) -> impl Content<TuiOut> + use<'_> {
|
||||||
let heading = "Next:";
|
let heading = Align::e("Next:");
|
||||||
let content = self.per_track_top(|_, _|" --- ");
|
let content = self.per_track_top(|_, _|Tui::bg(Reset, " --- "));
|
||||||
self.row_top(self.w(), 1, heading, content)
|
self.row_top(self.w(), 1, heading, content)
|
||||||
}
|
}
|
||||||
|
|
||||||
// INPUTS /////////////////////////////////////////////////////////////////////////////////////
|
// INPUTS /////////////////////////////////////////////////////////////////////////////////////
|
||||||
fn view_inputs (&self) -> impl Content<TuiOut> + use<'_> {
|
fn view_inputs (&self) -> impl Content<TuiOut> + use<'_> {
|
||||||
let fg = Tui::g(224);
|
let fg = Tui::g(224);
|
||||||
let heading = self.io_heading(" I", "midi ins", self.midi_ins.len(), fg, Tui::g(64),
|
let key = " I";
|
||||||
||self.inputs_sizes());
|
let label = "midi ins";
|
||||||
let content = self.per_track_top(move|t, track|{
|
let count = self.midi_ins.len();
|
||||||
|
let heading = Fill::x(Align::w(self.button3(key, label, format!("{count}"))));
|
||||||
|
let rows = self.io_ports(fg, Tui::g(32), ||self.inputs_sizes());
|
||||||
|
let columns = self.per_track_top(move|t, track|{
|
||||||
let rec = track.player.recording;
|
let rec = track.player.recording;
|
||||||
let mon = track.player.monitoring;
|
let mon = track.player.monitoring;
|
||||||
let rec = if rec { White } else { track.color.darkest.rgb };
|
let rec = if rec { White } else { track.color.darkest.rgb };
|
||||||
let mon = if mon { White } else { track.color.darkest.rgb };
|
let mon = if mon { White } else { track.color.darkest.rgb };
|
||||||
let bg = if self.selected().track() == Some(t+1) { track.color.light.rgb } else { track.color.base.rgb };
|
let bg = if self.selected().track() == Some(t+1) { track.color.light.rgb } else { track.color.base.rgb };
|
||||||
let bg2 = if t > 0 { self.tracks()[t - 1].color.base.rgb } else { Reset };
|
let bg2 = if t > 0 { self.tracks()[t - 1].color.base.rgb } else { Reset };
|
||||||
let headers = Self::wrap(bg, fg, Tui::bold(true,
|
Self::wrap(bg, fg, Tui::bold(true, Fill::x(Bsp::e(
|
||||||
Bsp::e(Tui::fg_bg(rec, bg, "Rec "), Tui::fg_bg(rec, bg, "Mon "))));
|
Tui::fg_bg(rec, bg, "Rec "),
|
||||||
let toggles = Map::new(||self.inputs_sizes(), move|(index, name, conn, y, y2), _|
|
Tui::fg_bg(rec, bg, "Mon ")))))});
|
||||||
map_south(y as u16, (y2-y) as u16, Self::wrap(bg, fg,
|
let toggles = self.per_track_top(move|t, track|self.io_connections(
|
||||||
Bsp::e(Tui::fg_bg(rec, bg, "R▞▞▞▞"), Tui::fg_bg(mon, bg, "M▞▞▞▞")))));
|
track.color.dark.rgb, track.color.darker.rgb, ||self.inputs_sizes()));
|
||||||
Bsp::a(Fill::y(Align::n(headers)), toggles)});
|
//let toggles = Map::new(||self.inputs_sizes(), move|(index, name, conn, y, y2), _|
|
||||||
|
//map_south(y as u16, (y2-y) as u16, Self::wrap(bg, fg, Fill::x(Bsp::e(
|
||||||
let row = self.row_top(self.w(), self.h_inputs(), heading, content);
|
//Tui::fg_bg(rec, bg, format!("{y} {y2} {name}")),
|
||||||
|
//Tui::fg_bg(mon, bg, "M▞▞▞▞"))))));
|
||||||
row
|
//Bsp::a(Fill::y(Align::n(headers)), Fill::y(Align::n(toggles)))});
|
||||||
//Bsp::s(Tui::bg(Black, row), self.view_clips_into())
|
Bsp::s(
|
||||||
|
Bsp::s(
|
||||||
|
self.row_top(self.w(), 1, heading, columns),
|
||||||
|
self.row_top(self.w(), self.h_inputs() - 1, rows, toggles),
|
||||||
|
),
|
||||||
|
self.view_clips_into()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// OUTPUTS ////////////////////////////////////////////////////////////////////////////////////
|
// OUTPUTS ////////////////////////////////////////////////////////////////////////////////////
|
||||||
fn view_outputs (&self) -> impl Content<TuiOut> + use<'_> {
|
fn view_outputs (&self) -> impl Content<TuiOut> + use<'_> {
|
||||||
let fg = Tui::g(224);
|
let fg = Tui::g(224);
|
||||||
let heading = self.io_heading(" O", "midi outs", self.midi_outs.len(), fg, Tui::g(64),
|
let key = " O";
|
||||||
||self.outputs_sizes());
|
let label = "midi outs";
|
||||||
let content = self.per_track_top(move|t, track|{
|
let count = self.midi_outs.len();
|
||||||
|
let heading = Fill::x(Align::w(self.button3(key, label, format!("{count}"))));
|
||||||
|
let rows = self.io_ports(fg, Tui::g(32), ||self.outputs_sizes());
|
||||||
|
let columns = self.per_track_top(move|t, track|{
|
||||||
let mute = false;
|
let mute = false;
|
||||||
let solo = false;
|
let solo = false;
|
||||||
let mute = if mute { White } else { track.color.darkest.rgb };
|
let mute = if mute { White } else { track.color.darkest.rgb };
|
||||||
let solo = if solo { White } else { track.color.darkest.rgb };
|
let solo = if solo { White } else { track.color.darkest.rgb };
|
||||||
let bg = if self.selected().track() == Some(t+1) { track.color.light.rgb } else { track.color.base.rgb };
|
let bg = if self.selected().track() == Some(t+1) { track.color.light.rgb } else { track.color.base.rgb };
|
||||||
let bg2 = if t > 0 { self.tracks()[t - 1].color.base.rgb } else { Reset };
|
let bg2 = if t > 0 { self.tracks()[t - 1].color.base.rgb } else { Reset };
|
||||||
let headers = Self::wrap(bg, fg, Tui::bold(true,
|
Self::wrap(bg, fg, Tui::bold(true, Fill::x(Bsp::e(
|
||||||
Bsp::e(Tui::fg_bg(mute, bg, "Play "), Tui::fg_bg(solo, bg, "Solo "))));
|
Tui::fg_bg(mute, bg, "Play "),
|
||||||
let toggles = Map::new(||self.outputs_sizes(), move|(index, name, conn, y, y2), _|
|
Tui::fg_bg(solo, bg, "Solo ")))))});
|
||||||
map_south(y as u16, (y2-y) as u16, Self::wrap(bg, fg,
|
let toggles = self.per_track_top(move|t, track|self.io_connections(
|
||||||
Bsp::e(Tui::fg_bg(mute, bg, "P▞▞▞▞"), Tui::fg_bg(solo, bg, "S▞▞▞▞")))));
|
track.color.dark.rgb, track.color.darker.rgb, ||self.outputs_sizes()));
|
||||||
Bsp::a(Fill::y(Align::n(headers)), toggles)});
|
//Map::new(||self.outputs_sizes(), move|(index, name, conn, y, y2), _|
|
||||||
|
//map_south(y as u16, (y2-y) as u16, Self::wrap(bg, fg, Fill::x(Bsp::e(
|
||||||
let row = self.row_top(self.w(), self.h_outputs(), heading, content);
|
//Tui::fg_bg(mute, bg, "P▞▞▞▞"),
|
||||||
|
//Tui::fg_bg(solo, bg, "S▞▞▞▞"))))));
|
||||||
row
|
//Bsp::a(Fill::y(Align::n(headers)), Fill::y(Align::n(toggles)))});
|
||||||
//Bsp::s(Bsp::s(self.view_clips_next(), self.view_clips_from()), Tui::bg(Black, row))
|
Align::n(Bsp::s(
|
||||||
|
Bsp::s(self.view_clips_next(), self.view_clips_from()),
|
||||||
|
Bsp::s(
|
||||||
|
self.row_top(self.w(), 1, heading, columns),
|
||||||
|
self.row_top(self.w(), self.h_outputs() - 1, rows, toggles),
|
||||||
|
)
|
||||||
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
// SCENES /////////////////////////////////////////////////////////////////////////////////////
|
// SCENES /////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
@ -482,10 +525,8 @@ impl Tek {
|
||||||
}
|
}
|
||||||
fn view_scene_add (&self) -> impl Content<TuiOut> + use<'_> {
|
fn view_scene_add (&self) -> impl Content<TuiOut> + use<'_> {
|
||||||
let data = (self.selected().scene().unwrap_or(0), self.scenes().len());
|
let data = (self.selected().scene().unwrap_or(0), self.scenes().len());
|
||||||
self.fmtd.write().unwrap().scns.update(Some(data),
|
self.fmtd.write().unwrap().scns.update(Some(data), rewrite!(buf, "({}/{})", data.0, data.1));
|
||||||
rewrite!(buf, "({}/{})", data.0, data.1));
|
self.button3(" S", "add scene", self.fmtd.read().unwrap().scns.view.clone())
|
||||||
self.button(" C-a ", Bsp::e(" add scene ",
|
|
||||||
self.fmtd.read().unwrap().scns.view.clone()))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fn colors (
|
fn colors (
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
(bsp/s
|
(bsp/s
|
||||||
(max/y 1 :toolbar)
|
(fixed/y 1 :toolbar)
|
||||||
(fill/x (align/c (bsp/a (fill/xy (align/e :pool))
|
(fill/xy (align/c (bsp/a (fill/xy (align/e :pool))
|
||||||
(bsp/a
|
(bsp/a
|
||||||
(fill/xy (align/n (bsp/s :tracks :inputs)))
|
(fill/xy (align/n (bsp/s :tracks :inputs)))
|
||||||
(bsp/a
|
(bsp/a
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue