Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad mouse position when releasing EditorSpinSlider #46708

Closed
jmb462 opened this issue Mar 5, 2021 · 3 comments · Fixed by #48444
Closed

Bad mouse position when releasing EditorSpinSlider #46708

jmb462 opened this issue Mar 5, 2021 · 3 comments · Fixed by #48444

Comments

@jmb462
Copy link
Contributor

jmb462 commented Mar 5, 2021

Godot version:
4.0 Master branch

OS/device including version:
Windows 10

Issue description:
When the mouse cursor reappears after dragging an EditorSpinSlider grabber, the position of the cursor is wrong.
It reappears at the exact location it was hidden despite the fact that the slider has moved.

before

Steps to reproduce:
Move any slider in a EditorSpinSlider (with the mouse set the rotation_degrees property of a node2d for instance)
Look at the location where the cursor reappears.

@Calinou
Copy link
Member

Calinou commented Mar 5, 2021

Is this a regression in master, or does this also occur on 3.2.3 or 3.2.4rc3?

@jmb462
Copy link
Contributor Author

jmb462 commented Mar 5, 2021

@Calinou It's a regression because in 3.2.3 and 3.2.4rc3, the mouse is not set in captured mode while dragging.

The problem happens when the mode is set back to normal mode : the cursor reapears by default at the center of the screen and the current code put it back at the previous location.

I assumed that the choice of captured mode is due to the fact that some sliders add a factor between the move relative input and the value modification. So it will be weird to keep the mouse visible while she doesn't follow the grabber.

@Calinou Calinou added this to the 4.0 milestone Mar 5, 2021
@jmb462
Copy link
Contributor Author

jmb462 commented Mar 15, 2021

Grabber TextureRect is set at top_level.
Seems to related to #44334 as the slider acts like we never use the grabber and just drag into the text area.

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

Successfully merging a pull request may close this issue.

2 participants