mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
remove uses of Split, implement Bsp::area
This commit is contained in:
parent
9f7b23a252
commit
aa910540c0
5 changed files with 79 additions and 57 deletions
|
|
@ -128,29 +128,32 @@ render!(Tui: (self: Groovebox) => {
|
|||
PhraseSelector::play_phrase(&self.player),
|
||||
PhraseSelector::next_phrase(&self.player),
|
||||
)));
|
||||
let pool = move|x|Split::w(false, pool_w,
|
||||
Pull::y(1, Fill::y(Align::e(PoolView(&self.pool)))),
|
||||
let pool = move|x|Bsp::w(
|
||||
Fixed::x(pool_w, Pull::y(1, Fill::y(Align::e(PoolView(&self.pool))))),
|
||||
x);
|
||||
let sampler = move|x|Bsp::e(
|
||||
Fixed::x(sampler_w, Fill::xy(col!(
|
||||
Meters(self.sampler.input_meter.as_ref()),
|
||||
GrooveboxSamples(self)))),
|
||||
x);
|
||||
let sampler = move|x|Split::e(false, sampler_w, Fill::xy(col!(
|
||||
Meters(self.sampler.input_meter.as_ref()),
|
||||
GrooveboxSamples(self)
|
||||
)), x);
|
||||
let status = EditStatus(&self.sampler, &self.editor, note_pt, pool(sampler(&self.editor)));
|
||||
Fill::xy(lay!(
|
||||
&self.size,
|
||||
Fill::xy(Align::s(Fixed::y(2, GrooveboxStatus::from(self)))),
|
||||
Shrink::y(2, col!(
|
||||
transport,
|
||||
selector,
|
||||
status
|
||||
))
|
||||
))
|
||||
lay!("kyp", "nymka")
|
||||
//status
|
||||
//Fill::xy(lay!(
|
||||
//&self.size,
|
||||
//Fill::xy(Align::s(Fixed::y(2, GrooveboxStatus::from(self)))),
|
||||
//Shrink::y(2, col!(
|
||||
//transport,
|
||||
//selector,
|
||||
//status
|
||||
//))
|
||||
//))
|
||||
});
|
||||
|
||||
struct EditStatus<'a, T: Content<Tui>>(&'a Sampler, &'a MidiEditor, usize, T);
|
||||
impl<'a, T: Content<Tui>> Content<Tui> for EditStatus<'a, T> {
|
||||
fn content (&self) -> impl Content<Tui> {
|
||||
Split::n(false, 9, col!(
|
||||
Bsp::n(Fixed::y(9, col!(
|
||||
row!(
|
||||
self.0.mapped[self.2].as_ref().map(|sample|format!(
|
||||
"Sample {}-{}",
|
||||
|
|
@ -169,7 +172,7 @@ impl<'a, T: Content<Tui>> Content<Tui> for EditStatus<'a, T> {
|
|||
SampleViewer(None)
|
||||
})),
|
||||
),
|
||||
), &self.3)
|
||||
)), &self.3)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue