Fix the split_handle sticking issue.#43
Conversation
|
Fixed #41 |
|
Hey @Yanxiyimengya, thanks for creating separate PRs for the fixes! The changes looks good to me (although I still have to test). I let the CI run, gdformat is saying that the code format does not conform to GDScript standard, could you please reformat the code using it to maintain consistency? |
Thank you for your reply. I have finished formatting the code and merged all the commits. |
| if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT: | ||
| if not event.is_pressed(): | ||
| _dragging = false | ||
| get_viewport().set_input_as_handled() |
There was a problem hiding this comment.
Why does this branch calls set_input_as_handled, while the one for the mouse motion without left button pressed (if block at line 50) does not?
In the current version, all input handling for releasing the handle is done in gui_input of split_handle.gd. When the mouse moves too quickly, the input is not passed to gui_input, causing the handle to stick to the mouse. This PR fixes this issue.