first go at a control panel, not fancy

This commit is contained in:
2026-06-19 01:49:04 -07:00
parent 2d8cc5d1d7
commit 433ac4152b
6 changed files with 95 additions and 49 deletions
+1 -7
View File
@@ -15,7 +15,7 @@ Command :: struct {
}
gather_commands :: proc(world: ^World) -> Command {
ui_cmd := overlay_ui_command(world)
ui_cmd := poll_controls_command(world)
if ui_cmd.kind != .None do return ui_cmd
if world.phase == .Build && rl.IsKeyPressed(.N) {
@@ -28,12 +28,6 @@ gather_commands :: proc(world: ^World) -> Command {
return Command{kind = .Place_Tower, gx = gx, gy = gy}
}
if rl.IsMouseButtonPressed(.LEFT) {
mouse := rl.GetMousePosition()
gx, gy := screen_to_grid(mouse.x, mouse.y)
return Command{kind = .Place_Tower, gx = gx, gy = gy}
}
return Command{kind = .None}
}