+2 votes

Are there any workaround on how to determine a letter or number on a string? or Is there a way to just allow number input on LineEdit? I don't want to use SpinBox though, it's not that customizable unlike LineEdit (Dynamic Font, Styles, etc..)

Thanks

in Engine by (29 points)

I don't want to use SpinBox though, it's not that customizable unlike LineEdit (Dynamic Font, Styles, etc..)

I am having issues with SpinBox aswell but you can customize the font and styles of the spinbox by using a Theme and editing the LineEdit class since the spinbox uses a LineEdit in the back end.

1 Answer

+6 votes

In String documentation there are functions like is_valid_float() or is_valid_integer()

by (104 points)

Thank you so much. I don't know why I didn't notice this in the documentation. Thank you again, cheers.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.