Skip to content

Commit

Permalink
fixup! C: AdvanceToolTable
Browse files Browse the repository at this point in the history
优化启动速度
  • Loading branch information
way-zer committed Jun 6, 2024
1 parent 878aa15 commit 6d05c3f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions core/src/mindustryX/features/ui/ArcUnitFactoryDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ public ArcUnitFactoryDialog(){
//noinspection unchecked
getCell(cont).setElement(new ScrollPane(cont)).growX();

closeOnBack();
addCloseButton();
//Lazy build
shown(() -> {
if(cont.hasChildren()) return;
setup();
});
}

private void setup(){
cont.table(t -> {
t.add("目标单位:");
t.image().update(it -> it.setDrawable(spawnUnit.type.uiIcon)).scaling(Scaling.fit).size(iconMed);
Expand Down Expand Up @@ -122,9 +132,6 @@ public ArcUnitFactoryDialog(){
Time.run(chatTime, () -> chatTime = 0f);
control.input.panCamera(Tmp.v1.set(unitLoc).scl(tilesize));
}).fillX().visible(() -> Core.settings.getBool("easyJS")).row();

closeOnBack();
addCloseButton();
}

void buildUnitFabricator(Table table){
Expand Down

0 comments on commit 6d05c3f

Please sign in to comment.