GUI

All info i learned about building graphical user interfaces in Godot.

Nodes

Here is a list of common Control nodes with their name next to them:

control_gallery

Most used nodes

Unhandled input

Once an InputEvent didn't interact with the GUI, it is forwarded to the _unhandled_input method:

func _unhandled_input(event: InputEvent) -> void:
    if event.is_action_pressed("lmb"):
        on_lmb_pressed.emit( get_mouse_position_ray_result() )
    if event.is_action_released("lmb"):
        on_lmb_released.emit( get_mouse_position_ray_result() )

How does it work?