Cleanup
This commit is contained in:
@@ -606,6 +606,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
t.label(() -> mode == select ? "@sectors.select" : "").style(Styles.outlineLabel).color(Pal.accent);
|
t.label(() -> mode == select ? "@sectors.select" : "").style(Styles.outlineLabel).color(Pal.accent);
|
||||||
}),
|
}),
|
||||||
buttons,
|
buttons,
|
||||||
|
|
||||||
// planet selection
|
// planet selection
|
||||||
new Table(t -> {
|
new Table(t -> {
|
||||||
t.top().left();
|
t.top().left();
|
||||||
@@ -614,17 +615,11 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
Table starsTable = new Table(Styles.black);
|
Table starsTable = new Table(Styles.black);
|
||||||
pane.setWidget(starsTable);
|
pane.setWidget(starsTable);
|
||||||
pane.setScrollingDisabled(true, false);
|
pane.setScrollingDisabled(true, false);
|
||||||
|
|
||||||
int starCount = 0;
|
int starCount = 0;
|
||||||
for(Planet star : content.planets()){
|
for(Planet star : content.planets()){
|
||||||
if(star.solarSystem != star) continue;
|
if(star.solarSystem != star || !content.planets().contains(p -> p.solarSystem == star && selectable(p))) continue;
|
||||||
boolean hasSelectablePlanets = false;
|
|
||||||
for(Planet planet : content.planets()){
|
|
||||||
if(planet.solarSystem == star && selectable(planet)){
|
|
||||||
hasSelectablePlanets = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!hasSelectablePlanets) continue;
|
|
||||||
starCount++;
|
starCount++;
|
||||||
if(starCount > 1) starsTable.add(star.localizedName).padLeft(10f).padBottom(10f).padTop(10f).left().width(190f).row();
|
if(starCount > 1) starsTable.add(star.localizedName).padLeft(10f).padBottom(10f).padTop(10f).left().width(190f).row();
|
||||||
Table planetTable = new Table();
|
Table planetTable = new Table();
|
||||||
|
|||||||
Reference in New Issue
Block a user