mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
wip: focus refactor, e13
This commit is contained in:
parent
364769a2e0
commit
6127aa4b30
9 changed files with 110 additions and 65 deletions
|
|
@ -26,7 +26,7 @@ macro_rules! impl_transport_view_state {
|
|||
($Struct:ident :: $field:ident) => {
|
||||
impl TransportViewState for $Struct {
|
||||
fn transport_selected (&self) -> TransportFocus {
|
||||
self.$field.focus.inner()
|
||||
self.focused().inner()
|
||||
}
|
||||
fn transport_focused (&self) -> bool {
|
||||
true
|
||||
|
|
@ -34,16 +34,16 @@ macro_rules! impl_transport_view_state {
|
|||
}
|
||||
}
|
||||
}
|
||||
impl_transport_view_state!(TransportTui::state);
|
||||
impl_transport_view_state!(SequencerTui::transport);
|
||||
impl_transport_view_state!(ArrangerTui::transport);
|
||||
impl_transport_view_state!(TransportTui::clock);
|
||||
impl_transport_view_state!(SequencerTui::clock);
|
||||
impl_transport_view_state!(ArrangerTui::clock);
|
||||
|
||||
pub trait ArrangerViewState {
|
||||
fn arranger_focused (&self) -> bool;
|
||||
}
|
||||
impl ArrangerViewState for ArrangerTui {
|
||||
fn arranger_focused (&self) -> bool {
|
||||
self.focused() == ArrangerFocus::Arranger
|
||||
self.focused() == AppFocus::Content(ArrangerFocus::Arranger)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue