• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-c誰得cocoaqtpythonrubywindowsphpgameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwitterdombtronvb.nettestarduinodirectxpreviewerゲームエンジン

Commit MetaInfo

Revisión893381debb1e10f5bf5a454e8e868db1d1ba054c (tree)
Tiempo2021-04-28 02:25:35
Autorsebastian_bugiu
Commitersebastian_bugiu

Log Message

Moved UI in game elements a bit more to the centre in order to compensate for the notch.

Cambiar Resumen

Diferencia incremental

diff -r 0bd2711a888a -r 893381debb1e core/build.gradle
--- a/core/build.gradle Mon Apr 26 22:29:21 2021 +0300
+++ b/core/build.gradle Tue Apr 27 20:25:35 2021 +0300
@@ -87,6 +87,8 @@
8787 compile files("libs/gdx-1.9.9-SNAPSHOT.jar")
8888 // compile "com.badlogicgames.gdx:gdx-bullet:$gdxVersion"
8989 compile files("libs/gdx-bullet-1.9.9-SNAPSHOT.jar")
90+
91+ compile "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion"
9092 }
9193
9294
diff -r 0bd2711a888a -r 893381debb1e core/src/headwayent/blackholedarksun/APP_SinglePlayerGame.java
--- a/core/src/headwayent/blackholedarksun/APP_SinglePlayerGame.java Mon Apr 26 22:29:21 2021 +0300
+++ b/core/src/headwayent/blackholedarksun/APP_SinglePlayerGame.java Tue Apr 27 20:25:35 2021 +0300
@@ -8,9 +8,12 @@
88 import com.artemis.managers.TagManager;
99 import com.artemis.managers.TeamManager;
1010 import com.badlogic.gdx.Gdx;
11+import com.badlogic.gdx.backends.iosrobovm.IOSApplication;
1112 import com.badlogic.gdx.files.FileHandle;
1213 import com.google.common.eventbus.EventBus;
1314
15+import org.robovm.apple.coregraphics.CGRect;
16+
1417 import headwayent.blackholedarksun.automationframework.MultiPlayerCreateSessionWithFriendsAutomation;
1518 import headwayent.blackholedarksun.automationframework.MultiPlayerJoinSessionWithFriendsAutomation;
1619 import headwayent.blackholedarksun.automationframework.SinglePlayerMenuAutomation;
@@ -57,6 +60,9 @@
5760 import headwayent.hotshotengine.statedebugger.ENG_Frame;
5861
5962 import java.io.File;
63+import java.lang.reflect.Field;
64+import java.lang.reflect.InvocationTargetException;
65+import java.lang.reflect.Method;
6066 import java.util.TreeMap;
6167
6268 /**
@@ -741,6 +747,7 @@
741747 width = Gdx.graphics.getWidth();
742748 height = Gdx.graphics.getHeight();
743749 }
750+ double notchHeight = 0;
744751
745752 TreeMap<String, String> miscParams = new TreeMap<>();
746753 if (MainApp.PLATFORM == MainApp.Platform.ANDROID) {
@@ -761,6 +768,25 @@
761768 miscParams.put("gamma", "true");
762769 miscParams.put("FSAA", "");
763770 miscParams.put("vsync", "");
771+
772+ IOSApplication app = (IOSApplication) Gdx.app;
773+
774+ try {
775+ Field lastScreenBoundsField = IOSApplication.class.getDeclaredField("lastScreenBounds");
776+ lastScreenBoundsField.setAccessible(true);
777+ CGRect lastScreenBounds = (CGRect) lastScreenBoundsField.get(app);
778+ Method getYMethod = CGRect.class.getDeclaredMethod("getY", null);
779+ notchHeight = (Double) getYMethod.invoke(lastScreenBounds, null);
780+ System.out.println("notchHeight: " + notchHeight);
781+ } catch (NoSuchFieldException e) {
782+ e.printStackTrace();
783+ } catch (IllegalAccessException e) {
784+ e.printStackTrace();
785+ } catch (NoSuchMethodException e) {
786+ e.printStackTrace();
787+ } catch (InvocationTargetException e) {
788+ e.printStackTrace();
789+ }
764790 }
765791 // com.badlogic.gdx.Graphics iosGraphics = (com.badlogic.gdx.Graphics) Gdx.graphics;
766792 // long iosViewHandler = iosGraphics.getViewHandle();
diff -r 0bd2711a888a -r 893381debb1e core/src/headwayent/hotshotengine/exception/ENG_SoundException.java
--- a/core/src/headwayent/hotshotengine/exception/ENG_SoundException.java Mon Apr 26 22:29:21 2021 +0300
+++ b/core/src/headwayent/hotshotengine/exception/ENG_SoundException.java Tue Apr 27 20:25:35 2021 +0300
@@ -21,10 +21,10 @@
2121 // TODO Auto-generated constructor stub
2222 }
2323
24- public ENG_SoundException(String arg0, Throwable arg1, boolean arg2,
25- boolean arg3) {
26- super(arg0, arg1, arg2, arg3);
27- // TODO Auto-generated constructor stub
28- }
24+// public ENG_SoundException(String arg0, Throwable arg1, boolean arg2,
25+// boolean arg3) {
26+// super(arg0, arg1, arg2, arg3);
27+// // TODO Auto-generated constructor stub
28+// }
2929
3030 }
diff -r 0bd2711a888a -r 893381debb1e desktop/raw/hotshot_gamedata/overlay.overlay
--- a/desktop/raw/hotshot_gamedata/overlay.overlay Mon Apr 26 22:29:21 2021 +0300
+++ b/desktop/raw/hotshot_gamedata/overlay.overlay Tue Apr 27 20:25:35 2021 +0300
@@ -3,7 +3,7 @@
33 zorder 200
44 container Panel SpeedMeter
55 {
6- left 0.01
6+ left 0.1
77 top 0.6
88 width 0.08
99 height 0.39
@@ -51,15 +51,15 @@
5151 }
5252 container Panel Radar
5353 {
54- left 0.3
54+ left 0.4
5555 top 0.8
56- width 0.3
56+ width 0.4
5757 height 0.19
5858 material radar_mat
5959 }
6060 container Panel Afterburner
6161 {
62- left 0.9
62+ left 0.8
6363 top 0.7
6464 width 0.1
6565 height 0.1
@@ -67,7 +67,7 @@
6767 }
6868 container Panel Countermeasures
6969 {
70- left 0.9
70+ left 0.8
7171 top 0.5
7272 width 0.1
7373 height 0.1
@@ -75,7 +75,7 @@
7575 }
7676 container Panel Reloader
7777 {
78- left 0.9
78+ left 0.8
7979 top 0.3
8080 width 0.1
8181 height 0.1
@@ -83,7 +83,7 @@
8383 }
8484 container Panel WeaponSelectionLeft
8585 {
86- left 0.6
86+ left 0.5
8787 top 0.01
8888 width 0.1
8989 height 0.1
@@ -91,7 +91,7 @@
9191 }
9292 container Panel WeaponSelectionRight
9393 {
94- left 0.75
94+ left 0.65
9595 top 0.01
9696 width 0.1
9797 height 0.1
diff -r 0bd2711a888a -r 893381debb1e desktop/raw/hotshot_gamedata/overlay_fps.overlay
--- a/desktop/raw/hotshot_gamedata/overlay_fps.overlay Mon Apr 26 22:29:21 2021 +0300
+++ b/desktop/raw/hotshot_gamedata/overlay_fps.overlay Tue Apr 27 20:25:35 2021 +0300
@@ -3,7 +3,7 @@
33 zorder 210
44 container Panel fps_indicator
55 {
6- left 0.0
6+ left 0.1
77 top 0.0
88 width 0.1
99 height 0.1
diff -r 0bd2711a888a -r 893381debb1e desktop/raw/hotshot_gamedata/overlay_player_pos.overlay
--- a/desktop/raw/hotshot_gamedata/overlay_player_pos.overlay Mon Apr 26 22:29:21 2021 +0300
+++ b/desktop/raw/hotshot_gamedata/overlay_player_pos.overlay Tue Apr 27 20:25:35 2021 +0300
@@ -9,7 +9,7 @@
99 height 0.1
1010 element TextArea player_pos_text
1111 {
12- left 0.2
12+ left 0.3
1313 top 0.0
1414 width 0.5
1515 height 0.3
diff -r 0bd2711a888a -r 893381debb1e ios/build/classes/java/main/com/headwayent/blackholedarksun/IOSLauncher.class
Binary file ios/build/classes/java/main/com/headwayent/blackholedarksun/IOSLauncher.class has changed
diff -r 0bd2711a888a -r 893381debb1e ios/src/com/headwayent/blackholedarksun/IOSLauncher.java
--- a/ios/src/com/headwayent/blackholedarksun/IOSLauncher.java Mon Apr 26 22:29:21 2021 +0300
+++ b/ios/src/com/headwayent/blackholedarksun/IOSLauncher.java Tue Apr 27 20:25:35 2021 +0300
@@ -49,8 +49,8 @@
4949 applicationStartSettings.iosConfig = config;
5050
5151
52-
53- return new IOSApplication(new BlackholeDarksunMain(null, applicationStartSettings), config);
52+ IOSApplication iosApplication = new IOSApplication(new BlackholeDarksunMain(null, applicationStartSettings), config);
53+ return iosApplication;
5454 }
5555
5656 /**