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

Hide unused exp_edit from SpinBox's inspector #99289

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

shahriarlabib000
Copy link
Contributor

@shahriarlabib000 shahriarlabib000 commented Nov 15, 2024

@shahriarlabib000 shahriarlabib000 requested a review from a team as a code owner November 15, 2024 16:53
@shahriarlabib000 shahriarlabib000 changed the title hide unused exp_edit from SpinBox inspector Hide unused exp_edit from SpinBox's inspector Nov 15, 2024
@Calinou
Copy link
Member

Calinou commented Nov 15, 2024

I don't see any references to exp_edit in Godot's codebase, other than two mentions in the class reference. The property seems to have no effect at all and could be deprecated (and hidden in the inspector) at the Range level.

@shahriarlabib000
Copy link
Contributor Author

shahriarlabib000 commented Nov 15, 2024

So i just need to do this same code in Range.cpp ? Or do we remove exp_edit completely from Range?

@shahriarlabib000
Copy link
Contributor Author

shahriarlabib000 commented Nov 15, 2024

I think it's necessary for Range::set_as_ratio ,get_as_ratio etc which needs shared->exp_ratio which is set by set_exp_ratio which is triggered by this (I think?)
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "exp_edit"), "set_exp_ratio", "is_ratio_exp");

@KoBeWi
Copy link
Member

KoBeWi commented Nov 15, 2024

Yes, exp_edit is used for ratio, which is relevant mostly for Slider.
It has no effect in Range controls that don't use ratio, like SpinBox.

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.

Context: #97573 (comment)

@shahriarlabib000 You should've linked it in the PR description.

@shahriarlabib000
Copy link
Contributor Author

Sorry!

@shahriarlabib000

This comment was marked as resolved.

@KoBeWi KoBeWi modified the milestones: 4.x, 4.4 Nov 17, 2024
@akien-mga akien-mga changed the title Hide unused exp_edit from SpinBox's inspector Hide unused exp_edit from SpinBox's inspector Nov 19, 2024
@Repiteo Repiteo merged commit 3a4feed into godotengine:master Nov 19, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 19, 2024

Thanks!

@shahriarlabib000 shahriarlabib000 deleted the hideExp branch November 21, 2024 03:10
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.

4 participants