diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-16 23:07:39 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | bc6fe168278957ad15cf87826c8410e7358e0849 (patch) | |
| tree | 7b6ec8e9f3030ba77344c24f8ce387daca287ed5 /build.zig | |
| parent | 87e8d3dee3bd57d28c42672d35ae214bbc058b9a (diff) | |
| download | sketchbook-bc6fe168278957ad15cf87826c8410e7358e0849.tar.gz sketchbook-bc6fe168278957ad15cf87826c8410e7358e0849.zip | |
anim: Event.key, and the talk example runs in a window
An Event says its key (abi.Event.key), which the player and the talk example each spelled out by hand; `zig build talk` shows examples/talk.zig in a window on the generic host, its state under .zig-cache, and `zig build talk-lib --watch` beside it reloads every edit in place.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -267,6 +267,11 @@ pub fn build(b: *Build) void { talk_check.run.addArg("--define"); talk_check.run.addPrefixedDirectoryArg(b.fmt("{s}=", .{define}), talk.addExport(talk_exe, .{ .fps = 30, .frames = frames, .size = .{ 640, 360 } }).frames); } + // `zig build talk` shows it in a window; `zig build talk-lib --watch` + // beside it reloads every edit in place. + const talk_lib = talk.addLibrary(); + b.step("talk", "Run the talk example in a window (reload edits with `zig build talk-lib --watch`)").dependOn(&talk.addRun(talk_lib, .{ .state = ".zig-cache/talk.state" }).step); + b.step("talk-lib", "Build and install the talk example's hot-reloadable library").dependOn(&b.addInstallArtifact(talk_lib, .{}).step); const test_talk = b.step("test-talk", "Play the talk example: steps, back, slides, its slider, a reload mid-wait and its export"); test_talk.dependOn(&talk_check.run.step); test_step.dependOn(&talk_check.run.step); |
