Skip to content

Improve number field#101

Merged
brachy84 merged 7 commits into
GTNewHorizons:masterfrom
NeutronSelector:improve-number-field
Mar 20, 2026
Merged

Improve number field#101
brachy84 merged 7 commits into
GTNewHorizons:masterfrom
NeutronSelector:improve-number-field

Conversation

@NeutronSelector

Copy link
Copy Markdown

fix an excption occurd when TextFieldWidget is initilized like this :
new TextFieldWidget().setFormatAsInteger(true).width(width).height(12);

In this cas, if user enter a non-numeric char in the filed, InvalidNumberException thrown.

Improve QOL when a field is numric, remove all non numeric chars onRemoveFocus instead set 0.

Comment thread src/main/java/com/cleanroommc/modularui/widgets/textfield/TextFieldWidget.java Outdated
Comment thread src/main/java/com/cleanroommc/modularui/widgets/textfield/TextFieldWidget.java Outdated
@brachy84 brachy84 enabled auto-merge (squash) March 20, 2026 19:46
@brachy84 brachy84 merged commit 463e246 into GTNewHorizons:master Mar 20, 2026
1 check passed
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