aboutsummaryrefslogtreecommitdiff
path: root/examples/hello.zig
diff options
context:
space:
mode:
authorJacob Banta <[email protected]>2026-01-19 15:45:13 -0500
committerFuwn <[email protected]>2026-01-20 18:26:19 -0800
commitab2b5133b3eb1f76d14e7486f4906318e527231d (patch)
tree1e4ec654e779291faab5c5a470b9bb3db524c13f /examples/hello.zig
parentfeat: initial commit (diff)
downloadzigr-ab2b5133b3eb1f76d14e7486f4906318e527231d.tar.xz
zigr-ab2b5133b3eb1f76d14e7486f4906318e527231d.zip
update binding to TIGR 3.2.2 and Zig 0.15.2
Diffstat (limited to 'examples/hello.zig')
-rw-r--r--examples/hello.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/hello.zig b/examples/hello.zig
index 5f6b9e5..4fea55f 100644
--- a/examples/hello.zig
+++ b/examples/hello.zig
@@ -1,13 +1,13 @@
const zigr = @import("zigr");
pub fn main() void {
- var screen = zigr.tigrWindow(320, 240, "Hello", 0);
+ const screen: *zigr.Window = .init(320, 240, "Hello", .{});
- while (!(zigr.tigrClosed(screen) == 1) and !(zigr.tigrKeyDown(screen, zigr.TK_ESCAPE) == 1)) {
- zigr.tigrClear(screen, zigr.tigrRGB(0x80, 0x90, 0xa0));
- zigr.tigrPrint(screen, zigr.tfont, 120, 110, zigr.tigrRGB(0xff, 0xff, 0xff), "Hello, world.");
- zigr.tigrUpdate(screen);
+ while (!screen.closed() and !(screen.keyDown(.ESCAPE))) {
+ screen.clear(.initRGB(0x80, 0x90, 0xa0));
+ screen.print(null, 120, 110, .initRGB(0xff, 0xff, 0xff), "Hello, world.");
+ screen.update();
}
- zigr.tigrUpdate(screen);
+ screen.update();
}