Open GianptDev opened 1 year ago
The separation of the two makes a lot of sense imo as it's connected with other features such as notifications, also there's several different mouse_entered
signals in different places so can't realistically be merged into one behaviour, it'd be confusing if only some (like entering the window) are sent as events
Input events currently are global, valid everywhere, making it local is breaking that pattern
Damn you are right! I forgot that input events travel across the node tree. However if those specific events are triggered only to the target node without traveling across the nodes it should work... 🤔 but it would probably be confusing and I see why they are separated.
Describe the project you are working on
Using
Godot 3.5.2.stable.mono
I'm making a chess game.
Describe the problem or limitation you are having in your project
I'm using
StaticBody2d
for each tile of the chessboard and I want to show an animation when hovering the tiles,Since I want to handle dragging I'm overriding the
_input_event
function, but the events of the function does not include mouse enter and exit. I have to use the signals instead an define 2 mode functions for the events.It would be handy, even of everyone else that has my same idea, to add those events in the input events list and send them to
_input_event
.Describe the feature / enhancement and how it helps to overcome the problem or limitation
mouse_entered
is called and then, before any mouse motion,InputEventMouseEnter
is send to the input events.InputEventMouseExit
is send to the input events and the signalmouse_exited
is called.The signals could be kept to not broke compatibility with projects, but adding those 2 classes should not broke anything... I'm I right?
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
It could be done like this:
If this enhancement will not be used often, can it be worked around with a few lines of script?
Using the signals is the current way to do it, like this:
Is there a reason why this should be core and not an add-on in the asset library?
yes