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

Allow aborting SpinSlider value changes #88275

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

passivestar
Copy link
Contributor

@passivestar passivestar commented Feb 13, 2024

This allows you to use right click or escape to abort changes while dragging sliders in Inspector, same way you can do it with viewport gizmos

spinslider_abort.mp4

Closes godotengine/godot-proposals#9044
Closes #87639
Supersedes #87642

@@ -1488,6 +1488,10 @@ Transform3D Node3DEditorViewport::_compute_transform(TransformMode p_mode, const
}

void Node3DEditorViewport::_surface_mouse_enter() {
if (Input::get_singleton()->get_mouse_mode() == Input::MOUSE_MODE_CAPTURED) {
Copy link
Contributor Author

@passivestar passivestar Feb 13, 2024

Choose a reason for hiding this comment

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

When the mouse cursor is captured by another element (i.e a SpinSlider), 3d viewport grabs focus and starts reacting to input. It happens only if it's in the middle of the screen at that time, so must be unintentional

Copy link
Contributor

Choose a reason for hiding this comment

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

I've had this rarely occur even outside of this PR. This sounds good to me on paper.

Copy link
Contributor

Choose a reason for hiding this comment

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

This section is a duplicate of #87642, I can confirm that it works. All good if this PR supersedes it since it does more than mine.

@AThousandShips AThousandShips changed the title Allow to abort SpinSlider value changes Allow aborting SpinSlider value changes Feb 13, 2024
@Mickeon
Copy link
Contributor

Mickeon commented Feb 13, 2024

This gets my personal approval but I'm neither part of Usability, nor Editor teams.

editor/gui/editor_spin_slider.cpp Outdated Show resolved Hide resolved
Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

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

The above comment would be nice to address, but otherwise looks fine.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Feb 15, 2024
@akien-mga akien-mga merged commit c28493a into godotengine:master Feb 16, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

Non-freelook shortcuts can be triggered during freelook
6 participants