• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisão9bd0f047614ce6316e19c516bf54b509e0f1a65a (tree)
Hora2021-05-14 01:41:33
Autorsebastian_bugiu
Commitersebastian_bugiu

Mensagem de Log

Got rid of exit game button on mobile.

Mudança Sumário

Diff

diff -r d8713c914cfc -r 9bd0f047614c android/src/main/.DS_Store
Binary file android/src/main/.DS_Store has changed
diff -r d8713c914cfc -r 9bd0f047614c core/src/headwayent/blackholedarksun/loaders/MenuCompiler.java
--- a/core/src/headwayent/blackholedarksun/loaders/MenuCompiler.java Mon May 10 22:13:51 2021 +0300
+++ b/core/src/headwayent/blackholedarksun/loaders/MenuCompiler.java Thu May 13 19:41:33 2021 +0300
@@ -1,5 +1,6 @@
11 package headwayent.blackholedarksun.loaders;
22
3+import headwayent.blackholedarksun.MainApp;
34 import headwayent.blackholedarksun.menuresource.Menu;
45 import headwayent.blackholedarksun.menuresource.MenuSelection;
56 import headwayent.hotshotengine.exception.ENG_InvalidFormatParsingException;
@@ -8,6 +9,7 @@
89 import headwayent.hotshotengine.scriptcompiler.ENG_CompilerUtil;
910
1011 import java.io.DataInputStream;
12+import java.util.Iterator;
1113
1214 public class MenuCompiler extends ENG_AbstractCompiler<Menu> {
1315
@@ -27,6 +29,11 @@
2729 " determining the current name and next menu");
2830 }*/
2931 MenuSelection menuSelection = new MenuSelection();
32+ if (MainApp.PLATFORM == MainApp.Platform.ANDROID || MainApp.PLATFORM == MainApp.Platform.IOS) {
33+ if (s.equalsIgnoreCase("Exit")) {
34+ return menuSelection;
35+ }
36+ }
3037 menuSelection.name = s.replace("_", " ");
3138 s = ENG_CompilerUtil.getNextWord(fp0);
3239 checkNull(s);
@@ -93,6 +100,14 @@
93100 break;
94101 }
95102 }
103+ // Hack to get rid of the Exit menu issue when on mobile devices.
104+ for (Iterator<MenuSelection> iterator = menu.selectionList.iterator(); iterator.hasNext(); ) {
105+ MenuSelection menuSelection = iterator.next();
106+ if (menuSelection.name == null) {
107+ iterator.remove();
108+ }
109+ }
110+
96111 return menu;
97112 } finally {
98113 ENG_CompilerUtil.close(fp0);
diff -r d8713c914cfc -r 9bd0f047614c core/src/headwayent/blackholedarksun/menuresource/Menu.java
--- a/core/src/headwayent/blackholedarksun/menuresource/Menu.java Mon May 10 22:13:51 2021 +0300
+++ b/core/src/headwayent/blackholedarksun/menuresource/Menu.java Thu May 13 19:41:33 2021 +0300
@@ -13,7 +13,7 @@
1313 public ArrayList<MenuSelection> getValidSelections() {
1414 ArrayList<MenuSelection> menuSelections = new ArrayList<>();
1515 for (MenuSelection s : selectionList) {
16- if (!s.goToPreviousMenu) {
16+ if (!s.goToPreviousMenu && s.name != null) {
1717 menuSelections.add(s);
1818 }
1919 }
diff -r d8713c914cfc -r 9bd0f047614c core/src/headwayent/blackholedarksun/menusystemsimpleview/SimpleViewGameMenuManager.java
--- a/core/src/headwayent/blackholedarksun/menusystemsimpleview/SimpleViewGameMenuManager.java Mon May 10 22:13:51 2021 +0300
+++ b/core/src/headwayent/blackholedarksun/menusystemsimpleview/SimpleViewGameMenuManager.java Thu May 13 19:41:33 2021 +0300
@@ -326,11 +326,14 @@
326326 gameMenu.setOnClickListener(TUTORIAL_BUTTON, createOnClickListenerWithType(
327327 StartActivityOnClickListener.StartActivityOnClickListenerFactory.TYPE, bundle));
328328
329- gameMenu.setOnClickListener(EXIT_BUTTON, createOnClickListenerWithType(
330- ExitGameOnClickListener.ExitGameOnClickListenerFactory.TYPE));
329+ if (MainApp.PLATFORM == MainApp.Platform.DESKTOP) {
331330
332- gameMenu.setOnClickListener(EXIT_TO_MAIN_MENU_BUTTON, createOnClickListenerWithType(
333- ExitToMainMenuOnClickListener.ExitToMainMenuOnClickListenerFactory.TYPE));
331+ gameMenu.setOnClickListener(EXIT_BUTTON, createOnClickListenerWithType(
332+ ExitGameOnClickListener.ExitGameOnClickListenerFactory.TYPE));
333+
334+ gameMenu.setOnClickListener(EXIT_TO_MAIN_MENU_BUTTON, createOnClickListenerWithType(
335+ ExitToMainMenuOnClickListener.ExitToMainMenuOnClickListenerFactory.TYPE));
336+ }
334337
335338 bundle = new Bundle();
336339 bundle.putString("activity", LEVEL_SELECTION);
@@ -366,8 +369,10 @@
366369 bundle));
367370
368371
369- mainMenu.setOnClickListener(EXIT_BUTTON, createOnClickListenerWithType(
370- ExitGameOnClickListener.ExitGameOnClickListenerFactory.TYPE));
372+ if (MainApp.PLATFORM == MainApp.Platform.DESKTOP) {
373+ mainMenu.setOnClickListener(EXIT_BUTTON, createOnClickListenerWithType(
374+ ExitGameOnClickListener.ExitGameOnClickListenerFactory.TYPE));
375+ }
371376
372377 bundle = new Bundle();
373378 bundle.putString("activity", MULTIPLAYER_LOGIN);