Add omnibutton FAB (P4); fix Stage playback freeze when timeline hidden
Omnibutton (mobile/omni.rs): a context FAB whose radial holds the active layer's drawing tools laid out in a staggered inner/outer arc, plus a "+New" petal (create Vector/Audio/MIDI/Raster/Video layer, Group, Import, and Split/Duplicate when a clip is selected — dispatched as MenuActions) and a "more" petal that opens a full-tools grid when the layer has extra tools. Contextual: the tool ring only appears when the Stage is in the visible window; off-Stage the FAB is a "+New" create button. Tools/creates use Lucide icons. Pane-internal adds (nodes/notes/instruments) deferred to P6. Playback fix: document.current_time (read by the renderer for animation eval and video-frame decode) was only synced from the audio playback position inside TimelinePane::render_content. In the mobile shell, panes render on demand, so with the timeline off-screen current_time went stale and the Stage froze during playback. Move the sync into the per-frame block in update() so it runs regardless of which panes are visible.
This commit is contained in:
@@ -20,6 +20,7 @@ use crate::RenderContext;
|
||||
pub mod icons;
|
||||
mod inspector;
|
||||
pub mod intent;
|
||||
mod omni;
|
||||
mod stack;
|
||||
mod surface;
|
||||
mod transport;
|
||||
@@ -148,6 +149,12 @@ pub struct MobileState {
|
||||
pub show_instruments: bool,
|
||||
/// Inspector sheet height as a fraction of the region above the transport.
|
||||
pub inspector_frac: f32,
|
||||
/// Whether the omnibutton radial tool menu is open.
|
||||
pub omni_open: bool,
|
||||
/// Whether the omnibutton "more" grid (all tools) is open.
|
||||
pub omni_grid_open: bool,
|
||||
/// Whether the omnibutton "+New" create grid is open.
|
||||
pub omni_create_open: bool,
|
||||
/// Active handle drag (transient).
|
||||
pub drag: Option<StackDrag>,
|
||||
/// In-flight layout ease (transient).
|
||||
@@ -163,6 +170,9 @@ impl Default for MobileState {
|
||||
weights: [1.0, 1.0, 1.0],
|
||||
show_instruments: false,
|
||||
inspector_frac: 0.45,
|
||||
omni_open: false,
|
||||
omni_grid_open: false,
|
||||
omni_create_open: false,
|
||||
drag: None,
|
||||
anim: None,
|
||||
}
|
||||
@@ -221,4 +231,7 @@ pub fn render_mobile_shell(
|
||||
|
||||
// Transport floor: drawn last = always on top, the persistent spine.
|
||||
transport::render(ui, transport_rect, &mut rc.shared);
|
||||
|
||||
// Omnibutton FAB (radial tool menu) — drawn above the stack region, on top of everything else.
|
||||
omni::render(ui, region, rc, state);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user