mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-21 12:08:34 +07:00
Bugfixes
This commit is contained in:
parent
60306f146f
commit
52332e5821
@ -18,7 +18,7 @@ import io.anuke.mindustry.game.EventType.*;
|
||||
import io.anuke.mindustry.game.*;
|
||||
import io.anuke.mindustry.gen.*;
|
||||
import io.anuke.mindustry.input.*;
|
||||
import io.anuke.mindustry.maps.*;
|
||||
import io.anuke.mindustry.maps.Map;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
import io.anuke.mindustry.type.*;
|
||||
import io.anuke.mindustry.ui.dialogs.*;
|
||||
@ -26,8 +26,8 @@ import io.anuke.mindustry.world.*;
|
||||
import io.anuke.mindustry.world.blocks.storage.*;
|
||||
|
||||
import java.io.*;
|
||||
import java.time.*;
|
||||
import java.time.format.*;
|
||||
import java.text.*;
|
||||
import java.util.*;
|
||||
|
||||
import static io.anuke.arc.Core.*;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
@ -233,7 +233,7 @@ public class Control implements ApplicationListener, Loadable{
|
||||
state.rules = rules;
|
||||
logic.play();
|
||||
if(settings.getBool("savecreate")){
|
||||
control.saves.addSave(map.name() + "-" + DateTimeFormatter.ofPattern("MMM dd h:mm").format(LocalDateTime.now()));
|
||||
control.saves.addSave(map.name() + " " + new SimpleDateFormat("MMM dd h:mm", Locale.getDefault()).format(new Date()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -206,6 +206,7 @@ public class Saves{
|
||||
previewExecutor.submit(() -> {
|
||||
try{
|
||||
previewFile().writePNG(renderer.minimap.getPixmap());
|
||||
requestedPreview = false;
|
||||
}catch(Throwable t){
|
||||
t.printStackTrace();
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ public class LoadDialog extends FloatingDialog{
|
||||
button.defaults().left();
|
||||
|
||||
button.table(title -> {
|
||||
title.add("[accent]" + slot.getName()).left().growX();
|
||||
title.add("[accent]" + slot.getName()).left().growX().width(230f).wrap();
|
||||
|
||||
title.table(t -> {
|
||||
t.right();
|
||||
@ -119,7 +119,7 @@ public class LoadDialog extends FloatingDialog{
|
||||
String color = "[lightgray]";
|
||||
TextureRegion def = Core.atlas.find("nomap");
|
||||
|
||||
button.add(new BorderImage(def, 4f)).update(i -> {
|
||||
button.left().add(new BorderImage(def, 4f)).update(i -> {
|
||||
TextureRegionDrawable draw = (TextureRegionDrawable)i.getDrawable();
|
||||
if(draw.getRegion().getTexture().isDisposed()){
|
||||
draw.setRegion(def);
|
||||
@ -129,23 +129,23 @@ public class LoadDialog extends FloatingDialog{
|
||||
if(draw.getRegion() == def && text != null){
|
||||
draw.setRegion(new TextureRegion(text));
|
||||
}
|
||||
}).size(160f).padRight(5);
|
||||
}).left().size(160f).padRight(5);
|
||||
|
||||
button.table(meta -> {
|
||||
meta.left();
|
||||
meta.defaults().padBottom(3).left();
|
||||
meta.left().top();
|
||||
meta.defaults().padBottom(-2).left().width(250f);
|
||||
meta.row();
|
||||
meta.add(Core.bundle.format("save.map", color + (slot.getMap() == null ? Core.bundle.get("unknown") : slot.getMap().name())));
|
||||
meta.labelWrap(Core.bundle.format("save.map", color + (slot.getMap() == null ? Core.bundle.get("unknown") : slot.getMap().name())));
|
||||
meta.row();
|
||||
meta.add(Core.bundle.format("save.wave", color + slot.getWave()));
|
||||
meta.labelWrap(Core.bundle.format("save.wave", color + slot.getWave()));
|
||||
meta.row();
|
||||
meta.label(() -> Core.bundle.format("save.autosave", color + Core.bundle.get(slot.isAutosave() ? "on" : "off")));
|
||||
meta.labelWrap(() -> Core.bundle.format("save.autosave", color + Core.bundle.get(slot.isAutosave() ? "on" : "off")));
|
||||
meta.row();
|
||||
meta.label(() -> Core.bundle.format("save.playtime", color + slot.getPlayTime()));
|
||||
meta.labelWrap(() -> Core.bundle.format("save.playtime", color + slot.getPlayTime()));
|
||||
meta.row();
|
||||
meta.add(Core.bundle.format("save.date", color + slot.getDate())).colspan(2).padTop(5).right();
|
||||
meta.labelWrap(Core.bundle.format("save.date", color + slot.getDate()));
|
||||
meta.row();
|
||||
});
|
||||
}).left().growX().width(250f);
|
||||
|
||||
modifyButton(button, slot);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user