'Fixed' some iOS warnings

This commit is contained in:
Anuken
2021-02-07 13:08:10 -05:00
parent ee61d0dcfa
commit 1acc771edc
2 changed files with 12 additions and 14 deletions
+1 -1
View File
@@ -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
+4 -6
View File
@@ -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,9 +200,7 @@ 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(() -> {
Core.scene.table(Styles.black9, t -> {
t.visible(() -> { t.visible(() -> {
if(!forced) return false; if(!forced) return false;
t.toFront(); t.toFront();
@@ -208,9 +208,7 @@ public class IOSLauncher extends IOSApplication.Delegate{
return forced && (o == UIInterfaceOrientation.Portrait || o == UIInterfaceOrientation.PortraitUpsideDown); 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;
} }