Added 'abandon sector' button

This commit is contained in:
Anuken
2018-10-13 23:07:57 -04:00
parent a5ebeadd95
commit 5f89d8588d
5 changed files with 776 additions and 735 deletions

View File

@@ -52,8 +52,12 @@ public class SectorsDialog extends FloatingDialog{
hide();
ui.loadLogic(() -> world.sectors.playSector(selected));
}).size(230f, 64f).disabled(b -> selected == null)
.update(t -> t.setText(selected != null && selected.hasSave() ? "$text.sector.resume" : "$text.sector.deploy"));
}).size(210f, 64f).disabled(b -> selected == null)
.update(t -> t.setText(selected != null && selected.hasSave() ? "$text.sector.resume" : "$text.sector.deploy"));
buttons().addImageTextButton("$text.sector.abandon", "icon-cancel", 16*2, () ->
ui.showConfirm("$text.confirm", "$text.sector.abandon.confirm", () -> world.sectors.abandonSector(selected)))
.size(210f, 64f).disabled(b -> selected == null || !selected.hasSave());
}
void selectSector(Sector sector){