Godot Version

4.3 (steam)

Question

Hello there! I need complete master help for next case:
We have 3 main event handlings:

  1. _gui_input
  2. _unhandled_input
  3. _input

Which accept events from some categories of input (as I may know):

  1. _gui_input accept event when mouse clicked on a gui item (event not continue handlings and not catched by input/unhandled)
  2. _unahndled_input accept event if some input called but not _gui_event & _input event not accept them
  3. _input accept ANY Input event as main handler

Ok, if Im wrong from steps above - please guide me! Thank you very Much!

Next:

My current architect for the game looks like:

In HUD I have main GUI for player/esc pressed (settings window) and etc...

The main screen scene is changed to game scenes (tilemaplayers, players, monsters, interactive_game_objects and etc...)

Problem description:
IF character NOT get any inputs in (_unhandled_input) mouse clicks on skill-panel - is work fine.
IF character GET any inputs parallel mouse clicks on skill-panel - he handle in _unhandled_input the character attack button
What I've expect: when player GET any inputs in _unhandled_input and mouse is interract with any GUI - character not handle MOUSE_INPUT at all.

The question is: why this happen? how you correctly setup your unhandled_input/input/_gui_input and how to fix my trouble? with examples if you can.

And please, sorry for my bad english!

Thank you very much for help!

P.S. code parts of Player with inputs (gui skill_panel doesnt have any overrided unhandle_input/gui_input etc...)

little part of main scene of all GUI - HUD:

P.S2:
I need help explaining how you set up your Input systems more than I need help with a piece of code. I read the Input documentation before coming here, but I don't seem to understand it very well.

In general - it was me who turned out to be an idiot.

I’m not 100% sure that this is was the problem (although everything worked) but: the input described inside _unhandled_input in the Player class for some reason ignored these accept_event and other things. But as soon as I added the following lines to the processing (checking the incoming event) everything suddenly worked and mouse clicks on the panel are now separated from mouse clicks of the player

and if someone could help me with a wise explanation of why it worked, I would be a hundred times grateful to you!

(translated through a translator)

P.S. sorry for my bad eng. thanks!