Scale planet grid to planet radius (#8381)
* Scale planet grid to planet radius * Fix skewed sector icons on small planets
This commit is contained in:
@@ -785,7 +785,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
hoverLabel.touchable = Touchable.disabled;
|
||||
hoverLabel.color.a = state.uiAlpha;
|
||||
|
||||
Vec3 pos = planets.cam.project(Tmp.v31.set(hovered.tile.v).setLength(PlanetRenderer.outlineRad).rotate(Vec3.Y, -state.planet.getRotation()).add(state.planet.position));
|
||||
Vec3 pos = planets.cam.project(Tmp.v31.set(hovered.tile.v).setLength(PlanetRenderer.outlineRad * state.planet.radius).rotate(Vec3.Y, -state.planet.getRotation()).add(state.planet.position));
|
||||
hoverLabel.setPosition(pos.x - Core.scene.marginLeft, pos.y - Core.scene.marginBottom, Align.center);
|
||||
|
||||
hoverLabel.getText().setLength(0);
|
||||
@@ -831,7 +831,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
}
|
||||
|
||||
if(state.planet.hasGrid()){
|
||||
hovered = Core.scene.getDialog() == this ? state.planet.getSector(planets.cam.getMouseRay(), PlanetRenderer.outlineRad) : null;
|
||||
hovered = Core.scene.getDialog() == this ? state.planet.getSector(planets.cam.getMouseRay(), PlanetRenderer.outlineRad * state.planet.radius) : null;
|
||||
}else if(state.planet.isLandable()){
|
||||
boolean wasNull = selected == null;
|
||||
//always have the first sector selected.
|
||||
|
||||
Reference in New Issue
Block a user