diff --git a/src/main.zig b/src/main.zig index 166c99d..9993f5a 100644 --- a/src/main.zig +++ b/src/main.zig @@ -35,9 +35,7 @@ fn loadSqlite(path: [:0]const u8) State { pub fn main() !void { var state = State{ .unloaded = {} }; - var gpa = std.heap.GeneralPurposeAllocator(.{}){}; - defer _ = gpa.deinit(); - const alloc = gpa.allocator(); + const alloc = std.heap.c_allocator; const args = try std.process.argsAlloc(alloc); defer std.process.argsFree(alloc, args); @@ -50,10 +48,11 @@ pub fn main() !void { const screen_width = 800; const screen_height = 450; - raylib.InitWindow(screen_width, screen_height, "FabApp"); + raylib.InitWindow(screen_width, screen_height, "Loggy"); 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); @@ -96,6 +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); }, }