zig-raylib-db/src/departure.zig

23 lines
579 B
Zig
Raw Normal View History

2024-02-17 02:27:03 +01:00
const raylib = @import("raylib.zig");
const rl = raylib.rl;
const stateMod = @import("state.zig");
pub fn render(state: *stateMod.AppState) !void {
while (raylib.GetKeyPressed()) |key| {
switch (key) {
rl.KEY_LEFT => {
state.screen = .home;
},
else => {},
}
}
rl.BeginDrawing();
defer rl.EndDrawing();
rl.ClearBackground(raylib.ColorInt(0x18226f));
rl.DrawText(state.departure_screen_state.station_id.items.ptr, 16, 16, 32, rl.WHITE);
state.close_app = rl.WindowShouldClose();
}