'Fixed' some iOS warnings
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=1241a004a3d694f75263b9d78d359a7c260dc16b
|
archash=9e22aca9d446e07d5b89e41415ad2d42ad6b249e
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ import java.util.zip.*;
|
|||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
import static org.robovm.apple.foundation.NSPathUtilities.getDocumentsDirectory;
|
import static org.robovm.apple.foundation.NSPathUtilities.getDocumentsDirectory;
|
||||||
|
|
||||||
|
//warnings for deprecated functions related to multi-scene windows are not applicable here
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class IOSLauncher extends IOSApplication.Delegate{
|
public class IOSLauncher extends IOSApplication.Delegate{
|
||||||
private boolean forced;
|
private boolean forced;
|
||||||
|
|
||||||
@@ -198,19 +200,15 @@ public class IOSLauncher extends IOSApplication.Delegate{
|
|||||||
openURL(((NSURL)options.get(UIApplicationLaunchOptions.Keys.URL())));
|
openURL(((NSURL)options.get(UIApplicationLaunchOptions.Keys.URL())));
|
||||||
}
|
}
|
||||||
|
|
||||||
Events.on(ClientLoadEvent.class, e -> {
|
Events.on(ClientLoadEvent.class, e -> Core.app.post(() -> Core.app.post(() -> Core.scene.table(Styles.black9, t -> {
|
||||||
Core.app.post(() -> Core.app.post(() -> {
|
t.visible(() -> {
|
||||||
Core.scene.table(Styles.black9, 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("Rotate the device to landscape orientation to use the editor.").wrap().grow();
|
||||||
});
|
}))));
|
||||||
t.add("Rotate the device to landscape orientation to use the editor.").wrap().grow();
|
|
||||||
});
|
|
||||||
}));
|
|
||||||
});
|
|
||||||
|
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user