mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-29 20:47:18 -06:00
M14: clarify text selection and footage playback contracts
This commit is contained in:
@@ -169,8 +169,8 @@ fn text_range_p(p: &Value) -> Option<std::ops::Range<usize>> {
|
||||
/// and height are `w.abs().max(1.0)` and `h.abs().max(1.0)`; the layer position is the box centre.
|
||||
/// It is left justified unless `justify` is given. The layer is named by `name`, else the first 40
|
||||
/// characters of the first text line, else "Text". `edit: true` also opens a new editing
|
||||
/// session with the caret after the text and `created: true`, so leaving it empty removes the
|
||||
/// layer.
|
||||
/// session with anchor `0` and the caret after the text, selecting all initial text so the next
|
||||
/// insertion replaces it. The session has `created: true`, so leaving it empty removes the layer.
|
||||
fn new_text(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
let cid = comp_id(s, p)?;
|
||||
let comp = s.project.comp(cid).ok_or(EngineError::NoComp)?.clone();
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
//! The Footage panel (double-click footage in the Project panel): the source on its own time
|
||||
//! ruler, play / pause, In and Out marks, and the Edit Target buttons — Overlay Edit and Ripple
|
||||
//! Insert Edit — that cut the marked range into the active composition at its current time.
|
||||
//! Everything runs `footage.*` commands (state in `EditorState::footage_panel`).
|
||||
//! Time, marks and edits run `footage.*` commands (state in `EditorState::footage_panel`);
|
||||
//! the Play/Pause flag is local egui state.
|
||||
|
||||
use crate::i18n::{tr, tr_args};
|
||||
use effectcraft_engine::project::{FootageKind, ItemKind};
|
||||
@@ -17,7 +18,7 @@ use crate::theme::Tokens;
|
||||
/// per item, time and session revision), a ruler with the in/out span and CTI that scrubs on click
|
||||
/// or drag, Play/Pause, set In/Out, and Ripple Insert / Overlay Edit into the active comp. A solid
|
||||
/// shows its colour, footage without video says so, and an empty panel explains how to open one.
|
||||
/// Playback and time changes run `footage.*` commands, so the panel and agents share the state.
|
||||
/// Time changes run `footage.*` commands; the panel's Play/Pause flag is local egui state.
|
||||
pub fn show(app: &mut EffectcraftApp, ui: &mut egui::Ui, rect: Rect) {
|
||||
let t = app.tokens;
|
||||
let ctx = ui.ctx().clone();
|
||||
|
||||
Reference in New Issue
Block a user