diff options
Diffstat (limited to 'examples/hello.zig')
| -rw-r--r-- | examples/hello.zig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/hello.zig b/examples/hello.zig new file mode 100644 index 0000000..5f6b9e5 --- /dev/null +++ b/examples/hello.zig @@ -0,0 +1,13 @@ +const zigr = @import("zigr"); + +pub fn main() void { + var screen = zigr.tigrWindow(320, 240, "Hello", 0); + + 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); + } + + zigr.tigrUpdate(screen); +} |