From 123c402d07ce9ab0853b22aa6c20c9cc8daeb659 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 3 May 2025 15:31:55 -0400 Subject: [PATCH] Minor planet dialog fixes --- core/src/mindustry/core/UI.java | 5 ++++- core/src/mindustry/ui/dialogs/PlanetDialog.java | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/core/UI.java b/core/src/mindustry/core/UI.java index 8a3d830d8f..84eb1d70b9 100644 --- a/core/src/mindustry/core/UI.java +++ b/core/src/mindustry/core/UI.java @@ -598,7 +598,10 @@ public class UI implements ApplicationListener, Loadable{ Table t = new Table(Styles.black3); t.touchable = Touchable.disabled; t.margin(8f).add(text).style(Styles.outlineLabel).labelAlign(Align.center); - t.update(() -> t.setPosition(Core.graphics.getWidth()/2f, Core.graphics.getHeight()/2f, Align.center)); + t.update(() -> { + t.setPosition(Core.graphics.getWidth()/2f, Core.graphics.getHeight()/2f, Align.center); + t.toFront(); + }); t.actions(Actions.fadeOut(duration, Interp.pow4In), Actions.remove()); t.pack(); t.act(0.1f); diff --git a/core/src/mindustry/ui/dialogs/PlanetDialog.java b/core/src/mindustry/ui/dialogs/PlanetDialog.java index 5a9828ba9a..d55f1e0c14 100644 --- a/core/src/mindustry/ui/dialogs/PlanetDialog.java +++ b/core/src/mindustry/ui/dialogs/PlanetDialog.java @@ -111,9 +111,9 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{ //no multitouch drag if(Core.input.getTouches() > 1) return; - if(showing()){ - newPresets.clear(); - } + if(showing() && newPresets.peek() != state.planet.getLastSector()) return; + + newPresets.clear(); Vec3 pos = state.camPos;