2024-02-17 02:27:03 +01:00
|
|
|
const raylib = @import("raylib.zig");
|
|
|
|
const rl = raylib.rl;
|
2024-02-17 03:31:44 +01:00
|
|
|
const AppState = @import("state.zig");
|
2024-02-17 02:27:03 +01:00
|
|
|
|
2024-02-17 03:31:44 +01:00
|
|
|
pub fn render(state: *AppState) !void {
|
2024-02-17 02:27:03 +01:00
|
|
|
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();
|
|
|
|
}
|