mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
all seems to mostly work besides midi editor - here be dragons!
This commit is contained in:
parent
50bb8cab07
commit
e9957fcd49
1 changed files with 14 additions and 23 deletions
|
|
@ -120,35 +120,26 @@ render!(Tui: (self: Groovebox) => {
|
|||
let color = self.player.play_phrase().as_ref()
|
||||
.and_then(|(_,p)|p.as_ref().map(|p|p.read().unwrap().color))
|
||||
.clone();
|
||||
let transport = Fixed::y(3, row!(
|
||||
let transport = Fixed::y(3, Bsp::e(
|
||||
PlayPause(self.clock().is_rolling()),
|
||||
TransportView::new(self, color, true),
|
||||
));
|
||||
let selector = Push::x(sampler_w, Fixed::y(1, row!(
|
||||
let selector = Fixed::y(1, Bsp::e(
|
||||
PhraseSelector::play_phrase(&self.player),
|
||||
PhraseSelector::next_phrase(&self.player),
|
||||
)));
|
||||
));
|
||||
let sampler = Tui::bg(TuiTheme::g(32), Align::w(Fixed::x(sampler_w, Fill::xy(col!(
|
||||
Meters(self.sampler.input_meter.as_ref()),
|
||||
GrooveboxSamples(self)
|
||||
)))));
|
||||
let status = EditStatus(&self.sampler, &self.editor, note_pt, "test");
|
||||
let pool = PoolView(&self.pool);
|
||||
let with_pool = move|x|Bsp::w(Pull::y(1, Align::e(Fill::y(Fixed::x(pool_w, pool)))), x);
|
||||
with_pool(Fill::xy(Align::nw(col!(transport, selector))))
|
||||
//selector
|
||||
//let sampler = move|x|Bsp::e(
|
||||
//Fixed::x(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)));
|
||||
//status
|
||||
//Fill::xy(lay!(
|
||||
//&self.size,
|
||||
//Fill::xy(Align::s(Fixed::y(2, GrooveboxStatus::from(self)))),
|
||||
//Shrink::y(2, col!(
|
||||
//transport,
|
||||
//selector,
|
||||
//status
|
||||
//))
|
||||
//))
|
||||
});
|
||||
let with_pool = move|x|Bsp::w(Align::e(Fill::y(Fixed::x(pool_w, pool))), x);
|
||||
Fill::xy(Bsp::a(&self.size,
|
||||
Bsp::s(transport,
|
||||
Bsp::n(status,
|
||||
Bsp::n(selector,
|
||||
with_pool(Fill::xy(sampler)))))))});
|
||||
|
||||
struct EditStatus<'a, T: Content<Tui>>(&'a Sampler, &'a MidiEditor, usize, T);
|
||||
impl<'a, T: Content<Tui>> Content<Tui> for EditStatus<'a, T> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue