mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-24 13:39:03 +07:00
Add button
This commit is contained in:
parent
6236819f67
commit
8c310e38ff
@ -164,6 +164,13 @@ public class Saves{
|
|||||||
return saves;
|
return saves;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void deleteAll(){
|
||||||
|
saves.clear();
|
||||||
|
for(Fi file : saveDirectory.list()){
|
||||||
|
file.delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class SaveSlot{
|
public class SaveSlot{
|
||||||
public final Fi file;
|
public final Fi file;
|
||||||
boolean requestedPreview;
|
boolean requestedPreview;
|
||||||
|
@ -164,6 +164,13 @@ public class LoadDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).fillX().margin(10f);
|
}).fillX().margin(10f);
|
||||||
|
|
||||||
|
buttons.button("$save.clear", Icon.trash, () -> {
|
||||||
|
ui.showConfirm("$confirm", "$save.clear.confirm", () -> {
|
||||||
|
control.saves.deleteAll();
|
||||||
|
setup();
|
||||||
|
});
|
||||||
|
}).fillX().margin(10f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void runLoadSave(SaveSlot slot){
|
public void runLoadSave(SaveSlot slot){
|
||||||
|
Loading…
Reference in New Issue
Block a user