diff options
| author | Fuwn <[email protected]> | 2022-08-02 12:36:41 -1000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-08-02 12:36:41 -1000 |
| commit | e6b5da35362f3b74c99e9ed3ce40cee587070748 (patch) | |
| tree | 2aad0183d2a3c163d7d0017637b6201a85b785bd /examples/hello.zig | |
| download | zigr-e6b5da35362f3b74c99e9ed3ce40cee587070748.tar.xz zigr-e6b5da35362f3b74c99e9ed3ce40cee587070748.zip | |
feat: initial commit
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); +} |