Control_GuiInput Method |
Virtual method to be implemented by the user. Use this method to process and accept inputs on UI elements. See AcceptEvent.
Example: 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(Vector2));
* control has MouseFilter set to ;
* control is obstructed by another Control on top of it, which doesn't have MouseFilter set to ;
* control's parent has MouseFilter set to or has accepted the event;
* it happens outside parent's rectangle and the parent has either RectClipContent or _ClipsInput enabled.
Namespace: Godot
public virtual void _GuiInput( InputEvent event )
[Missing <param name="event"/> documentation for "M:Godot.Control._GuiInput(Godot.InputEvent)"]