diff options
-rw-r--r-- | src/main.zig | 7 | ||||
-rw-r--r-- | src/notcurses.zig | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/main.zig b/src/main.zig index fefba0a..56d0dbe 100644 --- a/src/main.zig +++ b/src/main.zig @@ -4,8 +4,13 @@ const nc = @import("notcurses.zig"); pub fn main() anyerror!void { var runtime = nc.init(); var plane = nc.stdplane(runtime); - nc.plane_putchar_yx(plane, 1, 2, 'T'); + nc.plane_set_fg_rgb8(plane, 123, 123, 123); + nc.plane_putchar_yx(plane, 1, 2, 'A'); + + nc.plane_set_fg_rgb8(plane, 13, 23, 255); + nc.plane_putchar_yx(plane, 3, 4, 'B'); while (true) { nc.render(runtime); + std.time.sleep(50); } } diff --git a/src/notcurses.zig b/src/notcurses.zig index 2adba41..b06775d 100644 --- a/src/notcurses.zig +++ b/src/notcurses.zig @@ -16,3 +16,7 @@ pub fn plane_putchar_yx(plane: ?*nc.ncplane, y: u8, x: u8, c: u8) void { pub fn render(runtime: ?*nc.notcurses) void { var ret = nc.notcurses_render(runtime); } + +pub fn plane_set_fg_rgb8(plane: ?*nc.ncplane, r: u8, g: u8, b: u8) void { + var ret = nc.ncplane_set_fg_rgb8(plane, r, g, b); +} |