mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-06 02:40:23 -08:00
Fixed #8523
This commit is contained in:
parent
13297023fe
commit
05f158fd51
1 changed files with 2 additions and 1 deletions
|
|
@ -279,7 +279,8 @@ public class UI implements ApplicationListener, Loadable{
|
||||||
cont.margin(30).add(text).padRight(6f);
|
cont.margin(30).add(text).padRight(6f);
|
||||||
TextFieldFilter filter = numbers ? TextFieldFilter.digitsOnly : (f, c) -> true;
|
TextFieldFilter filter = numbers ? TextFieldFilter.digitsOnly : (f, c) -> true;
|
||||||
TextField field = cont.field(def, t -> {}).size(330f, 50f).get();
|
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.defaults().size(120, 54).pad(4);
|
||||||
buttons.button("@cancel", () -> {
|
buttons.button("@cancel", () -> {
|
||||||
closed.run();
|
closed.run();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue