mod: change widget interface Widget.content replaced with Widget.render
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 29s
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 29s
The .resize `Event` has been adapted to include an _anchor_, which provide the full necessary information for each widget where to render on the screen with what requested size. Each Widget can then dynamically decide how and what to render (i.e. provide placeholder text in case the size is too small, etc.).
This commit is contained in:
@@ -15,7 +15,7 @@ pub fn Layout(comptime Event: type, comptime Renderer: type) type {
|
||||
if (!isTaggedUnion(Event)) {
|
||||
@compileError("Provided user event `Event` for `Layout(comptime Event: type)` is not of type `union(enum)`.");
|
||||
}
|
||||
const Widget = @import("../widget.zig").Widget(Event);
|
||||
const Widget = @import("../widget.zig").Widget(Event, Renderer);
|
||||
const Lay = @import("../layout.zig").Layout(Event, Renderer);
|
||||
const Element = union(enum) {
|
||||
layout: Lay,
|
||||
|
||||
Reference in New Issue
Block a user