Skip to content
  • Sponsor godotengine/godot

  • Notifications You must be signed in to change notification settings
  • Fork 22k
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

Hide slider for array size selector in editor #102392

Merged

Conversation

Meorge
Copy link
Contributor

@Meorge Meorge commented Feb 4, 2025

Closes #102391.

This PR removes the slider from the array size field in the inspector:

CleanShot 2025-02-03 at 19 09 18@2x

The behavior before this PR can be seen in the issue linked above. While not explicitly a bug, per se, the field's range is so wide that the moving the slider the tiniest bit would cause the array size to balloon past anything reasonable for people to make entries in or find a specific value for.

@kitbdev
Copy link
Contributor

kitbdev commented Feb 4, 2025

I think that the editing_integer property should be used instead, so the up down arrows are shown.

Use `editing_integer` so that editor has step buttons
@Meorge Meorge force-pushed the bugfix/remove-array-size-slider branch from f5060a0 to bbfbde9 Compare February 5, 2025 00:04
@Meorge
Copy link
Contributor Author

Meorge commented Feb 5, 2025

Thanks for the suggestion! It looks a lot better that way 😄

@Calinou
Copy link
Member

Calinou commented Feb 6, 2025

Both PRs are complementary to each other as far as I can tell. I don't understand why integer properties are starting to show sliders in the first place though, as this was clearly not intended by #95169.

@akien-mga
Copy link
Member

Both PRs are complementary to each other as far as I can tell. I don't understand why integer properties are starting to show sliders in the first place though, as this was clearly not intended by #95169.

I think the reason is that those property editors don't handle them as integers but as floats. So we need to chase down all such editors to make sure that if they deal with integers, they properly set editing_integer.

akien-mga added a commit to akien-mga/godot that referenced this pull request Feb 7, 2025
…-size-slider

Hide slider for array size selector in editor
@akien-mga akien-mga merged commit ceded4e into godotengine:master Feb 7, 2025
19 checks passed
@akien-mga
Copy link
Member

Thanks!

@Meorge Meorge deleted the bugfix/remove-array-size-slider branch February 7, 2025 00:48
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.

Exported array in inspector has slider for array size
5 participants