Hello, I'm trying to find the "proper" way to obtain the following behavior :
I have a contextual popup with a button that is opened when Right clicking on an Area.
I want to be able to close/hide it by right-clicking anywhere or left-clicking anywhere, however, i want to be able to trigger the child button's pressed signal if i happen to left click on the child button area.
If I hide the button from the parent processing the mouse inputs, the pressed signal is never emitted.
I've "solved" the issue by manually emitting the child's signal, but this seems VERY inelegant:
if (Input.IsActionJustPressed("left_mouse"))
{
if (interactions.combatButton.IsHovered())
{
var x = interactions.combatButton.EmitSignal(Button.SignalName.Pressed);
}
interactions.SetVisible(false);
}
Is there a proper way to obtain this behaviour in a less hacky and more scalable way ?
Thanks in advance !