Control._guiInput

Virtual method to be implemented by the user. Use this method to process and accept inputs on UI elements. See acceptEvent.

struct Control
@nogc nothrow
void
_guiInput

Examples

clicking a control.

func _gui_input(event): if event is InputEventMouseButton: if event.button_index == BUTTON_LEFT and event.pressed: print("I've been clicked D:")

The event won't trigger if: clicking outside the control (see hasPoint); control has mouseFilter set to constant MOUSE_FILTER_IGNORE; control is obstructed by another Control on top of it, which doesn't have mouseFilter set to constant MOUSE_FILTER_IGNORE; control's parent has mouseFilter set to constant MOUSE_FILTER_STOP or has accepted the event; it happens outside the parent's rectangle and the parent has either rectClipContent or _clipsInput enabled.

Meta