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

Handle integers as integers in inspector and script editor number fields #115

Merged
merged 1 commit into from
May 3, 2024

Conversation

aaronfranke
Copy link
Contributor

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 as inspector_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:
Screenshot 2024-04-19 at 4 08 11 PM

Copy link

vercel bot commented Apr 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
mirror-docs ⬜️ Ignored (Inspect) Apr 19, 2024 11:10pm

Copy link
Collaborator

@RevoluPowered RevoluPowered left a comment

Choose a reason for hiding this comment

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

LGTM

@RevoluPowered RevoluPowered merged commit 0d9af14 into dev May 3, 2024
8 checks passed
@RevoluPowered RevoluPowered deleted the integers branch May 3, 2024 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants