Fixed post-PLT sectors not showing up in database / Fixed planets being selectable through UI elements

This commit is contained in:
Anuken
2025-05-03 12:11:54 -04:00
parent cb83d70cda
commit 7fd106d7b7
3 changed files with 10 additions and 4 deletions

View File

@@ -69,6 +69,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
public Label hoverLabel = new Label("");
private Texture[] planetTextures;
private Element mainView;
private CampaignRulesDialog campaignRules = new CampaignRulesDialog();
public PlanetDialog(){
@@ -163,7 +164,10 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
public void tap(InputEvent event, float x, float y, int count, KeyCode button){
var hovered = getHoverPlanet(x, y);
if(hovered != null){
viewPlanet(hovered, false);
var hit = scene.hit(x, y, true);
if(hit == mainView){
viewPlanet(hovered, false);
}
}
}
});
@@ -593,7 +597,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
margin(0f);
stack(
new Element(){
mainView = new Element(){
{
//add listener to the background rect, so it doesn't get unnecessary touch input
addListener(new ElementGestureListener(){