调整指示器screen
This commit is contained in:
parent
7effc4f889
commit
343663db00
2 changed files with 12 additions and 10 deletions
|
@ -130,17 +130,18 @@ public class ArtilleryIndicatorScreen extends Screen {
|
|||
int i = (this.width - this.imageWidth) / 2;
|
||||
int j = (this.height - this.imageHeight) / 2;
|
||||
|
||||
this.posX = new EditBox(this.font, i + 24, j + 20, 40, 12, Component.empty());
|
||||
this.posX = new EditBox(this.font, i + 24, j + 20, 60, 12, Component.empty());
|
||||
this.initEditBox(this.posX);
|
||||
|
||||
this.posY = new EditBox(this.font, i + 24, j + 33, 40, 12, Component.empty());
|
||||
this.posY = new EditBox(this.font, i + 24, j + 33, 60, 12, Component.empty());
|
||||
this.initEditBox(this.posY);
|
||||
|
||||
this.posZ = new EditBox(this.font, i + 24, j + 46, 40, 12, Component.empty());
|
||||
this.posZ = new EditBox(this.font, i + 24, j + 46, 60, 12, Component.empty());
|
||||
this.initEditBox(this.posZ);
|
||||
|
||||
this.radius = new EditBox(this.font, i + 24, j + 59, 40, 12, Component.empty());
|
||||
this.radius = new EditBox(this.font, i + 24, j + 59, 20, 12, Component.empty());
|
||||
this.initEditBox(this.radius);
|
||||
this.radius.setMaxLength(2);
|
||||
this.radius.setFilter(s -> s.matches("\\d*"));
|
||||
}
|
||||
|
||||
|
@ -149,7 +150,7 @@ public class ArtilleryIndicatorScreen extends Screen {
|
|||
editBox.setTextColor(-1);
|
||||
editBox.setTextColorUneditable(-1);
|
||||
editBox.setBordered(false);
|
||||
editBox.setMaxLength(10);
|
||||
editBox.setMaxLength(9);
|
||||
this.addWidget(editBox);
|
||||
editBox.setEditable(true);
|
||||
editBox.setFilter(s -> s.matches("-?\\d*"));
|
||||
|
|
|
@ -136,17 +136,18 @@ public class FiringParametersScreen extends Screen {
|
|||
int i = (this.width - this.imageWidth) / 2;
|
||||
int j = (this.height - this.imageHeight) / 2;
|
||||
|
||||
this.posX = new EditBox(this.font, i + 44, j + 20, 40, 12, Component.empty());
|
||||
this.posX = new EditBox(this.font, i + 44, j + 20, 60, 12, Component.empty());
|
||||
this.initEditBox(this.posX);
|
||||
|
||||
this.posY = new EditBox(this.font, i + 43, j + 37, 40, 12, Component.empty());
|
||||
this.posY = new EditBox(this.font, i + 43, j + 37, 60, 12, Component.empty());
|
||||
this.initEditBox(this.posY);
|
||||
|
||||
this.posZ = new EditBox(this.font, i + 42, j + 54, 40, 12, Component.empty());
|
||||
this.posZ = new EditBox(this.font, i + 42, j + 54, 60, 12, Component.empty());
|
||||
this.initEditBox(this.posZ);
|
||||
|
||||
this.radius = new EditBox(this.font, i + 41, j + 71, 40, 12, Component.empty());
|
||||
this.radius = new EditBox(this.font, i + 41, j + 71, 20, 12, Component.empty());
|
||||
this.initEditBox(this.radius);
|
||||
this.radius.setMaxLength(2);
|
||||
this.radius.setFilter(s -> s.matches("\\d*"));
|
||||
}
|
||||
|
||||
|
@ -155,7 +156,7 @@ public class FiringParametersScreen extends Screen {
|
|||
editBox.setTextColor(0xb29f7c);
|
||||
editBox.setTextColorUneditable(0x5b4c3c);
|
||||
editBox.setBordered(false);
|
||||
editBox.setMaxLength(10);
|
||||
editBox.setMaxLength(9);
|
||||
this.addWidget(editBox);
|
||||
editBox.setEditable(true);
|
||||
editBox.setFilter(s -> s.matches("-?\\d*"));
|
||||
|
|
Loading…
Add table
Reference in a new issue