remove flutter impl
This commit is contained in:
parent
9d18f283d1
commit
847a11d293
51 changed files with 28 additions and 1379 deletions
34
src/main.zig
Normal file
34
src/main.zig
Normal file
|
@ -0,0 +1,34 @@
|
|||
const std = @import("std");
|
||||
const raylib = @cImport({
|
||||
@cInclude("raylib.h");
|
||||
});
|
||||
const raygui = @cImport({
|
||||
@cDefine("RAYGUI_IMPLEMENTATION", "1");
|
||||
@cInclude("raygui.h");
|
||||
});
|
||||
const sqlite = @cImport({
|
||||
@cInclude("sqlite3.h");
|
||||
});
|
||||
|
||||
pub fn main() !void {
|
||||
const screen_width = 800;
|
||||
const screen_height = 450;
|
||||
raylib.InitWindow(screen_width, screen_height, "raylib [core] example - basic window");
|
||||
raylib.SetTargetFPS(60);
|
||||
while (!raylib.WindowShouldClose()) {
|
||||
raylib.BeginDrawing();
|
||||
defer raylib.EndDrawing();
|
||||
|
||||
raylib.ClearBackground(raylib.RAYWHITE);
|
||||
raylib.DrawText("Congrats! You created your first window!", 190, 200, 20, raylib.LIGHTGRAY);
|
||||
if (raygui.GuiButton(.{ .x = 0, .y = 0, .width = 100, .height = 100 }, "MyButton") == 1) {}
|
||||
}
|
||||
raylib.CloseWindow();
|
||||
}
|
||||
|
||||
test "simple test" {
|
||||
var list = std.ArrayList(i32).init(std.testing.allocator);
|
||||
defer list.deinit(); // try commenting this out and see if zig detects the memory leak!
|
||||
try list.append(42);
|
||||
try std.testing.expectEqual(@as(i32, 42), list.pop());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue