Godot Version
4.4
Question
I’m working on a settings screen and have a question about the best way to handle input.
My scene has a main SettingsScreen (a parent Control) which contains multiple child Control nodes (entries with value changers). When a child node like a slider has focus, the user can adjust its value. At the same time, I want the parent SettingsScreen to be able to react to global UI actions, like an “Apply Settings” command from a gamepad button press.
I tried overriding _gui_input(event) in the parent SettingsScreen script, assuming it was the correct method for UI-specific events. However, _gui_input() only seems to be called on the specific Control that currently has focus. The event does not propagate up to the parent when a child is focused.
What is the intended Godot pattern for handling this scenario? Should _unhandled_input() or _input() be used for handling UI input actions? If not, is there a way to make _gui_input() events propagate up the node tree to parents?