mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-26 22:42:41 -08:00
Moved launch button
This commit is contained in:
parent
a7b80f025c
commit
83bc3e4e8d
1 changed files with 10 additions and 12 deletions
|
|
@ -94,7 +94,16 @@ public class PlanetDialog extends FloatingDialog{
|
|||
//TODO names
|
||||
buttons.addImageTextButton("$back", Icon.left, style, this::hide).margin(bmargin);
|
||||
buttons.addImageTextButton("Tech", Icon.tree, style, () -> ui.tech.show()).margin(bmargin);
|
||||
buttons.addImageTextButton("Launch", Icon.upOpen, style, this::hide).margin(bmargin);
|
||||
buttons.addImageTextButton("Launch", Icon.upOpen, style, () -> {
|
||||
if(selected != null){
|
||||
if(selected.is(SectorAttribute.naval)){
|
||||
ui.showInfo("You need a naval loadout to launch here.");
|
||||
return;
|
||||
}
|
||||
control.playSector(selected);
|
||||
hide();
|
||||
}
|
||||
}).margin(bmargin).disabled(b -> selected == null);
|
||||
buttons.addImageTextButton("Database", Icon.book, style, () -> ui.database.show()).margin(bmargin);
|
||||
buttons.addImageTextButton("Resources", Icon.file, style, this::hide).margin(bmargin);
|
||||
|
||||
|
|
@ -358,17 +367,6 @@ public class PlanetDialog extends FloatingDialog{
|
|||
|
||||
stable.row();
|
||||
|
||||
stable.addButton("Launch", () -> {
|
||||
if(selected != null){
|
||||
if(selected.is(SectorAttribute.naval)){
|
||||
ui.showInfo("You need a naval loadout to launch here.");
|
||||
return;
|
||||
}
|
||||
control.playSector(selected);
|
||||
hide();
|
||||
}
|
||||
}).size(120f, 50f).pad(2f);
|
||||
|
||||
stable.pack();
|
||||
stable.setPosition(x, y, Align.center);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue