Merge branch 'erekir' of https://github.com/Anuken/Mindustry into erekir

This commit is contained in:
Anuken 2022-05-08 23:53:28 -04:00
commit 1728b58290

View File

@ -53,24 +53,25 @@ public class GameOverDialog extends BaseDialog{
buttons.margin(10);
cont.table(t -> {
if(state.rules.pvp && winner != null){
cont.add(Core.bundle.format("gameover.pvp", winner.localized())).pad(6);
t.add(Core.bundle.format("gameover.pvp", winner.localized())).center().pad(6);
}else{
cont.add(state.isCampaign() ? Core.bundle.format("sector.lost", state.getSector().name()) : "@gameover").center().pad(6);
t.add(state.isCampaign() ? Core.bundle.format("sector.lost", state.getSector().name()) : "@gameover").center().pad(6);
}
cont.row();
t.row();
if(control.isHighScore()){
cont.add("@highscore").pad(6);
cont.row();
t.add("@highscore").pad(6);
t.row();
}
cont.pane(t -> {
t.margin(13f);
t.left().defaults().left();
t.setBackground(Styles.black3);
t.pane(p -> {
p.margin(13f);
p.left().defaults().left();
p.setBackground(Styles.black3);
t.table(stats -> {
p.table(stats -> {
if(state.rules.waves) addStat(stats, Core.bundle.get("stats.wave"), state.stats.wavesLasted, 0f);
addStat(stats, Core.bundle.get("stats.unitsCreated"), state.stats.unitsCreated, 0.05f);
addStat(stats, Core.bundle.get("stats.enemiesDestroyed"), state.stats.enemyUnitsDestroyed, 0.1f);
@ -80,15 +81,16 @@ public class GameOverDialog extends BaseDialog{
}).top().grow().row();
if(control.saves.getCurrent() != null){
t.table(tt -> {
tt.add(new FLabel(Core.bundle.get("stats.playtime"))).left().pad(5).growX();
tt.add(new FLabel("[accent]" + control.saves.getCurrent().getPlayTime())).right().pad(5);
p.table(pt -> {
pt.add(new FLabel(Core.bundle.get("stats.playtime"))).left().pad(5).growX();
pt.add(new FLabel("[accent]" + control.saves.getCurrent().getPlayTime())).right().pad(5);
}).growX();
}
}).minWidth(370).maxSize(580, 500).grow().pad(12).center().get();
}).grow().pad(12).top();
}).center().minWidth(370).maxSize(600, 550).grow();
if(state.isCampaign() && net.client()){
cont.row();
cont.add("@gameover.waiting").padTop(20f).row();
}