diff options
Diffstat (limited to 'anim/src/ui.zig')
| -rw-r--r-- | anim/src/ui.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/anim/src/ui.zig b/anim/src/ui.zig index cf12914..d770e05 100644 --- a/anim/src/ui.zig +++ b/anim/src/ui.zig @@ -247,6 +247,13 @@ pub const Ui = struct { return u.panelChrome(w, h, title, options.focus, options.note, options.legend); } + /// A tag's `note`, ranged right, drawn apart from its panel: for one + /// that crossfades with another. + pub fn tagNote(u: Ui, w: f32, note: []const u8) void { + const micro = theme.size.sans.micro; + u.text(.sans, micro, w - 10 - u.width(.sans, micro, note), theme.metric.context.tag - 6, note, theme.color.text.faint); + } + fn panelChrome(u: Ui, w: f32, h: f32, title: []const u8, focus: bool, note: []const u8, legend: []const Legend) Rect { const options = .{ .focus = focus, .note = note, .legend = legend }; const m = theme.metric.context; |
