Skip to content

Improve the range argument editor#443

Merged
BenjaTK merged 4 commits intogaea-godot:2.0from
BenjaTK:range
Oct 14, 2025
Merged

Improve the range argument editor#443
BenjaTK merged 4 commits intogaea-godot:2.0from
BenjaTK:range

Conversation

@BenjaTK
Copy link
Collaborator

@BenjaTK BenjaTK commented Sep 28, 2025

This PR updates the range argument editor's slider to use the code at detomon's assorted controls. This means the new editor looks and works nicer.

2025-09-28_11-18-00.mp4

@BenjaTK
Copy link
Collaborator Author

BenjaTK commented Sep 28, 2025

Also, I tried implementing a value/spread mode like the ParticleProcessMaterial editor but I couldn't get the spinboxes steps to work correctly, might try again later though

image (what I mean)

@BenjaTK BenjaTK changed the title Change the range argument editor Improve the range argument editor Sep 28, 2025
@BenjaTK BenjaTK assigned BenjaTK and unassigned BenjaTK Oct 4, 2025
@BenjaTK BenjaTK requested a review from cullumi October 4, 2025 15:12
@BenjaTK
Copy link
Collaborator Author

BenjaTK commented Oct 6, 2025

Oops this has some unnecessary changes, will fix later

@Zehir
Copy link
Collaborator

Zehir commented Oct 6, 2025

The range slider have some wierd beavior when you have a min value below 0 and/or a max value above 1. I am not sure what is the best way to handle it.
I also like more the semi circle than the triangle for the edges since the range icon is a donut. Maybe we could have a half donut here ?
Side question, do the range value should be clamp between 0 and 1 and for other case use a vector2i ?

@BenjaTK
Copy link
Collaborator Author

BenjaTK commented Oct 6, 2025

The range slider have some wierd beavior when you have a min value below 0 and/or a max value above 1. I am not sure what is the best way to handle it.
I also like more the semi circle than the triangle for the edges since the range icon is a donut. Maybe we could have a half donut here ?
Side question, do the range value should be clamp between 0 and 1 and for other case use a vector2i ?

I haven't noticed any weird behavior, what have you found?

The triangles match the style of the sliders in ParticleProcessMaterial. Imo it looks better that way, but I guess we can have a 3rd opinion (cough cough @cullumi )

I think Vector2i for range values would be confusing, and doing away with being able to have different min and maxes would make range values really niche.

@cullumi
Copy link
Collaborator

cullumi commented Oct 12, 2025

I think @Zehir's observation about values outside the range holds water, but mainly in that the range it covers should be larger for certain nodes. For example, a reasonable upper range for the DistanceFilter might be 100, rather than 1. Otherwise this behavior is pretty standard for range values.

I really like the new aesthetic for the slider, and the way you can slide the whole selection around is really convenient. The triangles are a good fit, I think. Matches the arrows for the sliders, and I don't really think input bits necessarily need to match the connection point, personally.

cullumi
cullumi previously approved these changes Oct 12, 2025
Copy link
Collaborator

@cullumi cullumi left a comment

Choose a reason for hiding this comment

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

Good to go, but should merge in or rebase 2.0 before completing (getting a lot of re-imports and such when I open up the project)

@BenjaTK
Copy link
Collaborator Author

BenjaTK commented Oct 13, 2025

I've changed the behavior a bit. It now matches the slider in Godot. It basically does this:

With the slider, you can't go outside the set bounds. So for example, if it's locked between 1 and 5, moving the slider will only go between those 2 numbers. When you change one of the Min and Man spinboxes to a value outside that range (and if allow_lesser or allow_greater are true), it'll adjust the slider's bounds. I can send a gif in a bit.

@BenjaTK
Copy link
Collaborator Author

BenjaTK commented Oct 13, 2025

Peek 2025-10-13 10-57

@BenjaTK BenjaTK requested a review from cullumi October 13, 2025 15:08
@cullumi
Copy link
Collaborator

cullumi commented Oct 14, 2025

I've changed the behavior a bit. It now matches the slider in Godot. It basically does this:

With the slider, you can't go outside the set bounds. So for example, if it's locked between 1 and 5, moving the slider will only go between those 2 numbers. When you change one of the Min and Man spinboxes to a value outside that range (and if allow_lesser or allow_greater are true), it'll adjust the slider's bounds. I can send a gif in a bit.

That's good stuff, love to see it expanding the slider, as well.

Copy link
Collaborator

@cullumi cullumi left a comment

Choose a reason for hiding this comment

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

This all checks out to me on the code side of things. Runs great, too.

@BenjaTK BenjaTK merged commit 8283da6 into gaea-godot:2.0 Oct 14, 2025
4 checks passed
@BenjaTK BenjaTK deleted the range branch October 16, 2025 14:04
@BenjaTK BenjaTK added ⌨️ interface and removed ✨ enhancement New feature or request labels Nov 9, 2025
@BenjaTK BenjaTK added ✨ enhancement New feature or request topic: editor Changes to the UI or UX of the editor. labels Nov 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ enhancement New feature or request topic: editor Changes to the UI or UX of the editor.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants