Various fixes

This commit is contained in:
Anuken
2020-11-02 16:46:11 -05:00
parent a13f7f633e
commit 8f53d44278
29 changed files with 1447 additions and 1317 deletions

View File

@@ -1,6 +1,5 @@
package mindustry.ui.dialogs;
import arc.graphics.*;
import arc.scene.ui.*;
import arc.scene.ui.layout.*;
import arc.struct.*;
@@ -36,16 +35,16 @@ public class ContentInfoDialog extends BaseDialog{
table.row();
table.image().height(3).color(Color.lightGray).pad(8).padLeft(0).padRight(0).fillX();
table.row();
if(content.description != null){
table.add(content.displayDescription()).padLeft(5).padRight(5).width(400f).wrap().fillX();
table.add("@category.purpose").color(Pal.accent).fillX().padTop(10);
table.row();
table.add("[lightgray]" + content.displayDescription()).wrap().fillX().padLeft(10).width(500f).left();
table.row();
table.image().height(3).color(Color.lightGray).pad(8).padLeft(0).padRight(0).fillX();
table.row();
if(!content.stats.useCategories){
table.add("@category.general").fillX().color(Pal.accent);
table.row();
}
}
Stats stats = content.stats;
@@ -76,6 +75,12 @@ public class ContentInfoDialog extends BaseDialog{
}
}
if(content.details != null){
table.add("[gray]" + content.details).pad(6).padTop(20).width(400f).wrap().fillX();
table.row();
}
ScrollPane pane = new ScrollPane(table);
cont.add(pane);

View File

@@ -136,7 +136,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
if(to.near().contains(launchSector)) return launchSector;
Sector launchFrom = launchSector;
if(launchFrom == null || (to.preset == null && !to.near().contains(launchSector))){
if(launchFrom == null){
//TODO pick one with the most resources
launchFrom = to.near().find(Sector::hasBase);
if(launchFrom == null && to.preset != null){