aboutsummaryrefslogtreecommitdiff
path: root/examples/hello.zig
blob: 5f6b9e5963d7b7ab8a49d82b6e0fa26420e8e90e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
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);
}