doggo/src/main.zig

21 lines
500 B
Zig
Raw Normal View History

2022-01-21 15:12:40 +01:00
const std = @import("std");
2024-05-04 19:03:50 +02:00
const capy = @import("capy");
2022-01-21 15:12:40 +01:00
2024-05-04 19:03:50 +02:00
// This is required for your app to build to WebAssembly and other particular architectures
pub usingnamespace capy.cross_platform;
2022-01-22 14:42:40 +01:00
2024-05-04 19:03:50 +02:00
pub fn main() !void {
try capy.backend.init();
2022-04-14 14:05:54 +02:00
2024-05-04 19:03:50 +02:00
var window = try capy.Window.init();
try window.set(
capy.label(.{ .text = "Hello, World", .alignment = .Center }),
);
2022-04-14 14:05:54 +02:00
2024-05-04 19:03:50 +02:00
window.setTitle("Hello");
window.setPreferredSize(250, 100);
window.show();
2022-01-22 14:42:40 +01:00
2024-05-04 19:03:50 +02:00
capy.runEventLoop();
2022-01-21 15:12:40 +01:00
}