From 0e0e900048a0c0455ddd497c20acb466594e42de Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Tue, 31 Oct 2023 14:21:35 +0100 Subject: [PATCH] add checkbox --- src/main.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.zig b/src/main.zig index 9993f5a..695cf2e 100644 --- a/src/main.zig +++ b/src/main.zig @@ -52,9 +52,9 @@ pub fn main() !void { raylib.SetTargetFPS(60); var file_dialog_state = raylib.InitGuiWindowFileDialog(raylib.GetWorkingDirectory()); - var active_tab: c_int = 0; // const ext = ".sqlite3"; // @memcpy(file_dialog_state.filterExt[0..ext.len], ext); + var checked = false; while (!raylib.WindowShouldClose()) { // @@ -95,8 +95,8 @@ pub fn main() !void { .loaded => |*db| { _ = db; - var tabs = [_][*c]const u8{ "Fabs", "Marvel" }; - _ = raylib.GuiTabBar(.{ .x = 20, .y = screen_height - 60, .width = screen_width - 40, .height = 40 }, &tabs, tabs.len, &active_tab); + const label_rect: raylib.Rectangle = .{ .x = 10, .y = 10, .width = 40, .height = 40 }; + _ = raylib.GuiCheckBox(label_rect, "Eat well", &checked); }, }