Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2019-08-28 13:18:31 -04:00

View File

@@ -7,6 +7,7 @@ import io.anuke.arc.scene.ui.layout.*;
import io.anuke.arc.util.*; import io.anuke.arc.util.*;
import io.anuke.arc.util.io.*; import io.anuke.arc.util.io.*;
import io.anuke.mindustry.core.*; import io.anuke.mindustry.core.*;
import io.anuke.mindustry.game.EventType.*;
import io.anuke.mindustry.game.Saves.*; import io.anuke.mindustry.game.Saves.*;
import io.anuke.mindustry.io.*; import io.anuke.mindustry.io.*;
import io.anuke.mindustry.net.Net; import io.anuke.mindustry.net.Net;
@@ -90,17 +91,19 @@ public class IOSLauncher extends IOSApplication.Delegate{
openURL(((NSURL)options.get(UIApplicationLaunchOptions.Keys.URL()))); openURL(((NSURL)options.get(UIApplicationLaunchOptions.Keys.URL())));
} }
Core.app.post(() -> Core.app.post(() -> { Events.on(ClientLoadEvent.class, e -> {
Core.scene.table("dialogDim", t -> { Core.app.post(() -> Core.app.post(() -> {
t.visible(() -> { Core.scene.table("dialogDim", t -> {
if(!forced) return false; t.visible(() -> {
t.toFront(); if(!forced) return false;
UIInterfaceOrientation o = UIApplication.getSharedApplication().getStatusBarOrientation(); t.toFront();
return forced && (o == UIInterfaceOrientation.Portrait || o == UIInterfaceOrientation.PortraitUpsideDown); 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; return b;
} }