Fixed some crashes
This commit is contained in:
@@ -769,7 +769,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean pan(float x, float y, float deltaX, float deltaY){
|
public boolean pan(float x, float y, float deltaX, float deltaY){
|
||||||
if(Core.scene.hasDialog() || Core.settings.getBool("keyboard")) return false;
|
if(Core.scene == null || Core.scene.hasDialog() || Core.settings.getBool("keyboard")) return false;
|
||||||
|
|
||||||
float scale = Core.camera.width / Core.graphics.getWidth();
|
float scale = Core.camera.width / Core.graphics.getWidth();
|
||||||
deltaX *= scale;
|
deltaX *= scale;
|
||||||
|
|||||||
@@ -711,6 +711,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
stable.table(t -> {
|
stable.table(t -> {
|
||||||
t.add("@sectors.resources").padRight(4);
|
t.add("@sectors.resources").padRight(4);
|
||||||
for(UnlockableContent c : sector.info.resources){
|
for(UnlockableContent c : sector.info.resources){
|
||||||
|
if(c == null) continue; //apparently this is possible.
|
||||||
t.image(c.icon(Cicon.small)).padRight(3).size(Cicon.small.size);
|
t.image(c.icon(Cicon.small)).padRight(3).size(Cicon.small.size);
|
||||||
}
|
}
|
||||||
}).padLeft(10f).fillX().row();
|
}).padLeft(10f).fillX().row();
|
||||||
|
|||||||
Reference in New Issue
Block a user