mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 12:46:42 +01:00
refactor PhrasePlayer::process callback
This commit is contained in:
parent
0820c10f8b
commit
3df8e87840
4 changed files with 118 additions and 87 deletions
|
|
@ -22,6 +22,8 @@ pub struct Arranger<E: Engine> {
|
|||
pub arrangement_split: u16,
|
||||
/// Width of phrase pool
|
||||
pub phrases_split: u16,
|
||||
/// Width and height of app at last render
|
||||
pub size: Measure<E>,
|
||||
}
|
||||
/// Sections in the arranger app that may be focused
|
||||
#[derive(Copy, Clone, PartialEq, Eq)]
|
||||
|
|
@ -121,9 +123,9 @@ impl<E: Engine> Arranger<E> {
|
|||
phrases: Arc<RwLock<PhrasePool<E>>>,
|
||||
) -> Self {
|
||||
let mut app = Self {
|
||||
jack: None,
|
||||
focus_cursor: (0, 1),
|
||||
phrases_split: 20,
|
||||
jack: None,
|
||||
focus_cursor: (0, 1),
|
||||
phrases_split: 20,
|
||||
arrangement_split: 21,
|
||||
editor: PhraseEditor::new(),
|
||||
status: ArrangerStatusBar::ArrangementClip,
|
||||
|
|
@ -135,6 +137,7 @@ impl<E: Engine> Arranger<E> {
|
|||
transport,
|
||||
arrangement,
|
||||
phrases,
|
||||
size: Measure::new(),
|
||||
};
|
||||
app.update_focus();
|
||||
app
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue