first go at a control panel, not fancy
This commit is contained in:
+1
-7
@@ -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}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user