mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
per-port routing; enter/exit fullscreen editor
This commit is contained in:
parent
f938ade839
commit
3e748fefa7
7 changed files with 79 additions and 58 deletions
|
|
@ -18,29 +18,6 @@ handle!(TuiIn: |self: App, input|Ok(if let Some(command) = self.config.keys.comm
|
|||
}));
|
||||
|
||||
#[tengri_proc::command(App)] impl AppCommand {
|
||||
fn edit (app: &mut App) -> Perhaps<Self> {
|
||||
app.project.editor = if app.project.editor.is_some() {
|
||||
None
|
||||
} else {
|
||||
let selection = app.selection().clone();
|
||||
match selection {
|
||||
Selection::TrackClip { track, scene } => {
|
||||
let clip = &mut app.scenes_mut()[scene].clips[track];
|
||||
if clip.is_none() {
|
||||
//app.clip_auto_create();
|
||||
*clip = Some(Arc::new(RwLock::new(MidiClip::new(
|
||||
"", false, 384, None, Some(ItemTheme::random())
|
||||
))));
|
||||
}
|
||||
clip.as_ref().map(|c|c.into())
|
||||
}
|
||||
_ => {
|
||||
None
|
||||
}
|
||||
}
|
||||
};
|
||||
Ok(None)
|
||||
}
|
||||
fn dialog (app: &mut App, dialog: Option<Dialog>) -> Perhaps<Self> {
|
||||
app.toggle_dialog(dialog);
|
||||
Ok(None)
|
||||
|
|
|
|||
|
|
@ -113,12 +113,18 @@ impl App {
|
|||
pub fn view_audio_outs_status (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
self.project.view_audio_outs_status(self.color)
|
||||
}
|
||||
pub fn view_tracks_scenes (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
pub fn view_scenes (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
Bsp::e(
|
||||
Fixed::x(20, Align::nw(self.project.view_scenes_names())),
|
||||
self.project.view_scenes_clips(),
|
||||
)
|
||||
}
|
||||
pub fn view_scenes_names (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
self.project.view_scenes_names()
|
||||
}
|
||||
pub fn view_scenes_clips (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
self.project.view_scenes_clips()
|
||||
}
|
||||
pub fn view_tracks_inputs <'a> (&'a self) -> impl Content<TuiOut> + use<'a> {
|
||||
Fixed::y(2 + self.project.midi_ins.len() as u16, self.project.view_inputs(self.color))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue