This commit is contained in:
Anuken 2023-04-21 21:29:39 -04:00
parent 13297023fe
commit 05f158fd51

View File

@ -279,7 +279,8 @@ public class UI implements ApplicationListener, Loadable{
cont.margin(30).add(text).padRight(6f);
TextFieldFilter filter = numbers ? TextFieldFilter.digitsOnly : (f, c) -> true;
TextField field = cont.field(def, t -> {}).size(330f, 50f).get();
field.setFilter((f, c) -> field.getText().length() < textLength && filter.acceptChar(f, c));
field.setMaxLength(textLength);
field.setFilter(filter);
buttons.defaults().size(120, 54).pad(4);
buttons.button("@cancel", () -> {
closed.run();