Skip to content

Building UI opens for wrong building #21

Description

@pumpkinchariot

When clicking on a building sometimes the UI of the building behind opens. It seems like the Event is not consumed properly.
Try something like:

func _unhandled_input(event): if event is InputEventKey and event.pressed and event.keycode == KEY_SPACE: print("Space key pressed!") event.consume() # Stop other _unhandled_input handlers in the same viewport from receiving this event

or

func _unhandled_input(event): if event is InputEventMouseButton and event.pressed: print("Viewport handled the click.") get_viewport().set_input_as_handled() # Prevent this event from propagating to other nodes or viewports

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething to fix.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions