support full screen gameplay

This commit is contained in:
2026-06-21 01:27:45 -07:00
parent ff341cb834
commit fcfd1e95d8
5 changed files with 82 additions and 16 deletions
+3 -3
View File
@@ -22,7 +22,7 @@ build_controls_layout :: proc() -> (archer, start_wave_btn: rl.Rectangle) {
poll_controls_command :: proc(world: ^World) -> Command {
if world.phase != .Build do return Command{kind = .None}
mouse := rl.GetMousePosition()
mouse := game_mouse()
if rl.IsMouseButtonPressed(.LEFT) {
archer, start_wave := build_controls_layout()
if rl.CheckCollisionPointRec(mouse, archer) {
@@ -38,7 +38,7 @@ poll_controls_command :: proc(world: ^World) -> Command {
draw_archer_button :: proc(world: ^World, archer: rl.Rectangle) {
arch := get_archetype(.Archer)
mouse := rl.GetMousePosition()
mouse := game_mouse()
arch_bg := CONTROLS_SHOP_IDLE
if world.selected_tower == .Archer do arch_bg = CONTROL_SHOP_SELECTED
@@ -57,7 +57,7 @@ draw_start_wave_button :: proc(start_wave_rect: rl.Rectangle, mouse: rl.Vector2)
draw_build_controls :: proc(world: ^World) {
if world.phase != .Build do return
mouse := rl.GetMousePosition()
mouse := game_mouse()
bar_y := bottom_bar_y()
rl.DrawRectangle(0, bar_y, SCREEN_W, CONTROL_BAR_H, CONTROL_BAR_BG)