Skip to content

Fix the split_handle sticking issue.#43

Open
Yanxiyimengya wants to merge 1 commit into
gilzoide:mainfrom
Yanxiyimengya:fix41
Open

Fix the split_handle sticking issue.#43
Yanxiyimengya wants to merge 1 commit into
gilzoide:mainfrom
Yanxiyimengya:fix41

Conversation

@Yanxiyimengya
Copy link
Copy Markdown
Contributor

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.

@Yanxiyimengya
Copy link
Copy Markdown
Contributor Author

Fixed #41

@gilzoide
Copy link
Copy Markdown
Owner

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?
The linter also complained about trailing whitespace in split_handle.gd at line 50.

@Yanxiyimengya
Copy link
Copy Markdown
Contributor Author

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? The linter also complained about trailing whitespace in split_handle.gd at line 50.

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()
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants