add(continous): example which provides a fixed render schedule

The other examples did rendering based on events, which this renderer
does not. This makes these applications potentially not that efficient,
but allows for consistent frame times that make animations, etc.
possible. This example serves to show that you can use `zterm` for both
types of render scheduling and even change between them without much
efford.
This commit is contained in:
2025-05-30 23:02:56 +02:00
parent 0d2644f476
commit 76f708d9d7
3 changed files with 269 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ pub fn build(b: *std.Build) void {
const Examples = enum {
all,
demo,
continous,
// elements:
alignment,
button,
@@ -54,6 +55,7 @@ pub fn build(b: *std.Build) void {
.name = e.name,
.root_source_file = b.path(switch (@as(Examples, @enumFromInt(e.value))) {
.demo => "examples/demo.zig",
.continous => "examples/continous.zig",
// elements:
.alignment => "examples/elements/alignment.zig",
.button => "examples/elements/button.zig",