diff --git a/ios/src/io/anuke/mindustry/IOSLauncher.java b/ios/src/io/anuke/mindustry/IOSLauncher.java index 575e7f7e47..67df891bd2 100644 --- a/ios/src/io/anuke/mindustry/IOSLauncher.java +++ b/ios/src/io/anuke/mindustry/IOSLauncher.java @@ -7,6 +7,7 @@ import io.anuke.arc.scene.ui.layout.*; import io.anuke.arc.util.*; import io.anuke.arc.util.io.*; import io.anuke.mindustry.core.*; +import io.anuke.mindustry.game.EventType.*; import io.anuke.mindustry.game.Saves.*; import io.anuke.mindustry.io.*; import io.anuke.mindustry.net.Net; @@ -90,17 +91,19 @@ public class IOSLauncher extends IOSApplication.Delegate{ openURL(((NSURL)options.get(UIApplicationLaunchOptions.Keys.URL()))); } - Core.app.post(() -> Core.app.post(() -> { - Core.scene.table("dialogDim", t -> { - t.visible(() -> { - if(!forced) return false; - t.toFront(); - UIInterfaceOrientation o = UIApplication.getSharedApplication().getStatusBarOrientation(); - return forced && (o == UIInterfaceOrientation.Portrait || o == UIInterfaceOrientation.PortraitUpsideDown); + Events.on(ClientLoadEvent.class, e -> { + Core.app.post(() -> Core.app.post(() -> { + Core.scene.table("dialogDim", t -> { + t.visible(() -> { + if(!forced) return false; + t.toFront(); + UIInterfaceOrientation o = UIApplication.getSharedApplication().getStatusBarOrientation(); + return forced && (o == UIInterfaceOrientation.Portrait || o == UIInterfaceOrientation.PortraitUpsideDown); + }); + t.add("Please rotate the device to landscape orientation to use the editor.").wrap().grow(); }); - t.add("Please rotate the device to landscape orientation to use the editor.").wrap().grow(); - }); - })); + })); + }); return b; }