separate render/content macros; add has_jack

This commit is contained in:
🪞👃🪞 2025-01-14 12:41:27 +01:00
parent 08184f9906
commit e62e36d558
19 changed files with 183 additions and 226 deletions

View file

@ -1,6 +1,6 @@
use crate::*;
pub struct PoolView<'a>(pub bool, pub &'a MidiPool);
render!(TuiOut: (self: PoolView<'a>) => {
content!(TuiOut: |self: PoolView<'a>| {
let Self(compact, model) = self;
let MidiPool { clips, mode, .. } = self.1;
let color = self.1.clip().map(|c|c.read().unwrap().color).unwrap_or_else(||TuiTheme::g(32).into());
@ -24,7 +24,7 @@ render!(TuiOut: (self: PoolView<'a>) => {
))))
})))))
});
render!(TuiOut: (self: ClipLength) => {
content!(TuiOut: |self: ClipLength| {
let bars = ||self.bars_string();
let beats = ||self.beats_string();
let ticks = ||self.ticks_string();