26 lines
707 B
Zig
26 lines
707 B
Zig
const std = @import("std");
|
|
const r = @import("raylib.zig");
|
|
|
|
pub fn main() anyerror!void {
|
|
std.log.info("All your codebase are belong to us.", .{});
|
|
|
|
r.InitWindow(800, 450, "ray [core] example - basic window");
|
|
defer r.CloseWindow();
|
|
|
|
while (!r.WindowShouldClose()) {
|
|
r.BeginDrawing();
|
|
defer r.EndDrawing();
|
|
|
|
r.ClearBackground(r.RAYWHITE);
|
|
r.DrawText("Congrats! You created your first window!", 190, 200, 20, r.LIGHTGRAY);
|
|
|
|
if (r.GuiButton(r.Rectangle{ .x = 190, .y = 250, .width = 150, .height = 30 }, "Button")) {
|
|
std.log.info("Button pressed", .{});
|
|
}
|
|
}
|
|
}
|
|
|
|
test "basic test" {
|
|
try std.testing.expectEqual(10, 3 + 7);
|
|
}
|