Handle integers as integers in inspector and script editor number fields #115
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before, integer input fields were just number fields. This means that The Mirror did not stop the user from inputting
1.2
into an integer, although it would later be truncated back to an integer when deserializing.Now, there is an
inspector_integer_field.tscn
file that has a step size of 1 that is used for integers. This is a minimal derived scene that uses the same code and nodes asinspector_number_field.tscn
. This is used in both the inspector, and in the visual script editor which uses the inspector's primitive editors.This change was driven by a desire to have forwards compatibility with godotengine/godot#47502
As a bonus, SpinBox will now show us arrows for integer input, which can be clicked to increment or decrement: