0 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

asked Mar 9, 2019 in Engine by mr-ro95 (26 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

+3 votes

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

answered Mar 10, 2019 by Maksanty (95 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.