diff options
Diffstat (limited to 'anim/src/ties.zig')
| -rw-r--r-- | anim/src/ties.zig | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/anim/src/ties.zig b/anim/src/ties.zig index 323cecf..d3a9ec7 100644 --- a/anim/src/ties.zig +++ b/anim/src/ties.zig @@ -77,6 +77,9 @@ pub const Place = union(enum) { /// where its pin lane runs (canvas pixels: x, the first row's top, the /// row's height). A link to a word outside it ends at its edge. pub var stack_window: ?struct { first: u64, slots: usize, x: f32, top: f32, row: f32 } = null; +/// The source's line waits (a `descent`: the pc is in code without source): +/// the thread waits with it, primary and 2 units. +pub var thread_waits = false; /// What this frame's components have said so far, in canvas pixels: left, top, right, bottom. /// shortcut: one table for the process, emptied by `Ties.draw`; a scene with two players at once wants it on the frame. @@ -175,6 +178,7 @@ pub const Ties = struct { pub fn draw(g: *const Ties, f: *sk.Frame, at: anim.Placed) void { defer said = 0; defer stack_window = null; + defer thread_waits = false; const now = g.cursor.now(at); // Diving or surfacing, the panels are on their way: no ties. for (@import("context.zig").zoomed) |z| if (z != null) return; @@ -193,8 +197,8 @@ pub const Ties = struct { fn thread(raw: ui.Ui, at: anim.Placed, k: f32) void { const line = find(.source) orelse return; const x = at.xf.apply(.{ theme.metric.tie.thread_x, 0 })[0]; - const gold = theme.mark(.current).solid; - const kind = [2]f32{ theme.metric.bracket.thread[0] * k, theme.metric.bracket.thread[1] * k }; + const gold = if (thread_waits) ui.rgb(theme.color.text.primary) else ui.rgb(theme.mark(.current).solid); + const kind = if (thread_waits) [2]f32{ theme.metric.bracket.quiet[0] * k, theme.metric.bracket.quiet[1] * k } else [2]f32{ theme.metric.bracket.thread[0] * k, theme.metric.bracket.thread[1] * k }; raw.bracket(x, line[1] + 2 * k, line[3] - 2 * k, gold, kind, 1, false); var bottom = line[3] - 2 * k; var top = line[1] + 2 * k; |
