doggo/src/main.zig

26 lines
707 B
Zig
Raw Normal View History

2022-01-21 15:12:40 +01:00
const std = @import("std");
2022-04-07 14:12:23 +02:00
const r = @import("raylib.zig");
2022-01-21 15:12:40 +01:00
pub fn main() anyerror!void {
std.log.info("All your codebase are belong to us.", .{});
2022-01-22 14:42:40 +01:00
2022-04-07 14:12:23 +02:00
r.InitWindow(800, 450, "ray [core] example - basic window");
defer r.CloseWindow();
2022-01-22 14:42:40 +01:00
2022-04-07 14:12:23 +02:00
while (!r.WindowShouldClose()) {
r.BeginDrawing();
defer r.EndDrawing();
2022-01-22 14:42:40 +01:00
2022-04-07 14:12:23 +02:00
r.ClearBackground(r.RAYWHITE);
r.DrawText("Congrats! You created your first window!", 190, 200, 20, r.LIGHTGRAY);
2022-01-22 14:42:40 +01:00
2022-04-07 14:12:23 +02:00
if (r.GuiButton(r.Rectangle{ .x = 190, .y = 250, .width = 150, .height = 30 }, "Button")) {
2022-03-24 13:25:40 +01:00
std.log.info("Button pressed", .{});
}
}
2022-01-21 15:12:40 +01:00
}
test "basic test" {
try std.testing.expectEqual(10, 3 + 7);
}