mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-08 23:07:33 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -127,6 +127,7 @@ public class Saves{
|
|||||||
saveMap.put(slot.index, slot);
|
saveMap.put(slot.index, slot);
|
||||||
slot.meta = SaveIO.getData(slot.index);
|
slot.meta = SaveIO.getData(slot.index);
|
||||||
current = slot;
|
current = slot;
|
||||||
|
slot.meta.sector = invalidSector;
|
||||||
saveSlots();
|
saveSlots();
|
||||||
return slot;
|
return slot;
|
||||||
}
|
}
|
||||||
|
@ -198,7 +198,7 @@ public class FileChooser extends FloatingDialog{
|
|||||||
//macs are confined to the Downloads/ directory
|
//macs are confined to the Downloads/ directory
|
||||||
if(!OS.isMac){
|
if(!OS.isMac){
|
||||||
Image upimage = new Image("icon-folder-parent");
|
Image upimage = new Image("icon-folder-parent");
|
||||||
TextButton upbutton = new TextButton(".." + directory.toString(), "clear");
|
TextButton upbutton = new TextButton(".." + directory.toString(), "clear-toggle");
|
||||||
upbutton.clicked(() -> {
|
upbutton.clicked(() -> {
|
||||||
directory = directory.parent();
|
directory = directory.parent();
|
||||||
updateFiles(true);
|
updateFiles(true);
|
||||||
@ -220,7 +220,7 @@ public class FileChooser extends FloatingDialog{
|
|||||||
|
|
||||||
String filename = file.name();
|
String filename = file.name();
|
||||||
|
|
||||||
TextButton button = new TextButton(shorten(filename), "clear");
|
TextButton button = new TextButton(shorten(filename), "clear-toggle");
|
||||||
group.add(button);
|
group.add(button);
|
||||||
|
|
||||||
button.clicked(() -> {
|
button.clicked(() -> {
|
||||||
|
@ -161,6 +161,7 @@ public class LoadDialog extends FloatingDialog{
|
|||||||
control.saves.importSave(file);
|
control.saves.importSave(file);
|
||||||
setup();
|
setup();
|
||||||
}catch(IOException e){
|
}catch(IOException e){
|
||||||
|
e.printStackTrace();
|
||||||
ui.showError(Bundles.format("text.save.import.fail", Strings.parseException(e, false)));
|
ui.showError(Bundles.format("text.save.import.fail", Strings.parseException(e, false)));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
@ -184,7 +184,7 @@ public class PlacementFragment extends Fragment{
|
|||||||
categories.addImageButton("icon-" + cat.name(), "clear-toggle", 16*2, () -> {
|
categories.addImageButton("icon-" + cat.name(), "clear-toggle", 16*2, () -> {
|
||||||
currentCategory = cat;
|
currentCategory = cat;
|
||||||
rebuildCategory.run();
|
rebuildCategory.run();
|
||||||
}).group(group).update(i -> i.setChecked(group.getChecked() == i));
|
}).group(group).update(i -> i.setChecked(currentCategory == cat));
|
||||||
|
|
||||||
if(cat.ordinal() %2 == 1) categories.row();
|
if(cat.ordinal() %2 == 1) categories.row();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user