mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-24 13:39:03 +07:00
Merge branch 'erekir' of https://github.com/Anuken/Mindustry into erekir
This commit is contained in:
commit
1728b58290
@ -53,42 +53,44 @@ public class GameOverDialog extends BaseDialog{
|
|||||||
|
|
||||||
buttons.margin(10);
|
buttons.margin(10);
|
||||||
|
|
||||||
if(state.rules.pvp && winner != null){
|
cont.table(t -> {
|
||||||
cont.add(Core.bundle.format("gameover.pvp", winner.localized())).pad(6);
|
if(state.rules.pvp && winner != null){
|
||||||
}else{
|
t.add(Core.bundle.format("gameover.pvp", winner.localized())).center().pad(6);
|
||||||
cont.add(state.isCampaign() ? Core.bundle.format("sector.lost", state.getSector().name()) : "@gameover").center().pad(6);
|
}else{
|
||||||
}
|
t.add(state.isCampaign() ? Core.bundle.format("sector.lost", state.getSector().name()) : "@gameover").center().pad(6);
|
||||||
cont.row();
|
|
||||||
|
|
||||||
if(control.isHighScore()){
|
|
||||||
cont.add("@highscore").pad(6);
|
|
||||||
cont.row();
|
|
||||||
}
|
|
||||||
|
|
||||||
cont.pane(t -> {
|
|
||||||
t.margin(13f);
|
|
||||||
t.left().defaults().left();
|
|
||||||
t.setBackground(Styles.black3);
|
|
||||||
|
|
||||||
t.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);
|
|
||||||
addStat(stats, Core.bundle.get("stats.built"), state.stats.buildingsBuilt, 0.15f);
|
|
||||||
addStat(stats, Core.bundle.get("stats.destroyed"), state.stats.buildingsDestroyed, 0.2f);
|
|
||||||
addStat(stats, Core.bundle.get("stats.deconstructed"), state.stats.buildingsDeconstructed, 0.25f);
|
|
||||||
}).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);
|
|
||||||
}).growX();
|
|
||||||
}
|
}
|
||||||
}).minWidth(370).maxSize(580, 500).grow().pad(12).center().get();
|
t.row();
|
||||||
|
|
||||||
|
if(control.isHighScore()){
|
||||||
|
t.add("@highscore").pad(6);
|
||||||
|
t.row();
|
||||||
|
}
|
||||||
|
|
||||||
|
t.pane(p -> {
|
||||||
|
p.margin(13f);
|
||||||
|
p.left().defaults().left();
|
||||||
|
p.setBackground(Styles.black3);
|
||||||
|
|
||||||
|
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);
|
||||||
|
addStat(stats, Core.bundle.get("stats.built"), state.stats.buildingsBuilt, 0.15f);
|
||||||
|
addStat(stats, Core.bundle.get("stats.destroyed"), state.stats.buildingsDestroyed, 0.2f);
|
||||||
|
addStat(stats, Core.bundle.get("stats.deconstructed"), state.stats.buildingsDeconstructed, 0.25f);
|
||||||
|
}).top().grow().row();
|
||||||
|
|
||||||
|
if(control.saves.getCurrent() != null){
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}).grow().pad(12).top();
|
||||||
|
}).center().minWidth(370).maxSize(600, 550).grow();
|
||||||
|
|
||||||
if(state.isCampaign() && net.client()){
|
if(state.isCampaign() && net.client()){
|
||||||
|
cont.row();
|
||||||
cont.add("@gameover.waiting").padTop(20f).row();
|
cont.add("@gameover.waiting").padTop(20f).row();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user