mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-13 01:08:06 +00:00
cleanup
This commit is contained in:
@@ -214,6 +214,9 @@ public class Forge implements ApplicationListener {
|
|||||||
public void run() {
|
public void run() {
|
||||||
//see if app or assets need updating
|
//see if app or assets need updating
|
||||||
AssetsDownloader.checkForUpdates(splashScreen);
|
AssetsDownloader.checkForUpdates(splashScreen);
|
||||||
|
if (exited) {
|
||||||
|
return;
|
||||||
|
} //don't continue if user chose to exit or couldn't download required assets
|
||||||
|
|
||||||
safeToClose = false;
|
safeToClose = false;
|
||||||
ImageKeys.setIsLibGDXPort(GuiBase.getInterface().isLibgdxPort());
|
ImageKeys.setIsLibGDXPort(GuiBase.getInterface().isLibgdxPort());
|
||||||
@@ -303,7 +306,7 @@ public class Forge implements ApplicationListener {
|
|||||||
|
|
||||||
public static void openHomeDefault() {
|
public static void openHomeDefault() {
|
||||||
//default to English only if CJK is missing
|
//default to English only if CJK is missing
|
||||||
getLocalizer().setEnglish(Forge.forcedEnglishonCJKMissing);
|
getLocalizer().setEnglish(forcedEnglishonCJKMissing);
|
||||||
GuiBase.setIsAdventureMode(false);
|
GuiBase.setIsAdventureMode(false);
|
||||||
openHomeScreen(-1, null); //default for startup
|
openHomeScreen(-1, null); //default for startup
|
||||||
isMobileAdventureMode = false;
|
isMobileAdventureMode = false;
|
||||||
@@ -372,7 +375,7 @@ public class Forge implements ApplicationListener {
|
|||||||
splashScreen.setShowModeSelector(true);
|
splashScreen.setShowModeSelector(true);
|
||||||
//start background music
|
//start background music
|
||||||
SoundSystem.instance.setBackgroundMusic(MusicPlaylist.MENUS);
|
SoundSystem.instance.setBackgroundMusic(MusicPlaylist.MENUS);
|
||||||
Forge.safeToClose = true;
|
safeToClose = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -386,7 +389,7 @@ public class Forge implements ApplicationListener {
|
|||||||
public static void setCursor(TextureRegion textureRegion, String name) {
|
public static void setCursor(TextureRegion textureRegion, String name) {
|
||||||
if (GuiBase.isAndroid())
|
if (GuiBase.isAndroid())
|
||||||
return;
|
return;
|
||||||
if (Forge.isMobileAdventureMode) {
|
if (isMobileAdventureMode) {
|
||||||
if (cursorA0 != null && name == "0") {
|
if (cursorA0 != null && name == "0") {
|
||||||
setGdxCursor(cursorA0);
|
setGdxCursor(cursorA0);
|
||||||
return;
|
return;
|
||||||
@@ -515,7 +518,7 @@ public class Forge implements ApplicationListener {
|
|||||||
if (!forcedEnglishonCJKMissing) {
|
if (!forcedEnglishonCJKMissing) {
|
||||||
forcedEnglishonCJKMissing = true;
|
forcedEnglishonCJKMissing = true;
|
||||||
getLocalizer().setEnglish(forcedEnglishonCJKMissing);
|
getLocalizer().setEnglish(forcedEnglishonCJKMissing);
|
||||||
System.err.println("Forge switches to English due to an error generating CJK Fonts. Language: "+Forge.locale);
|
System.err.println("Forge switches to English due to an error generating CJK Fonts. Language: "+locale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static void showMenu() {
|
public static void showMenu() {
|
||||||
@@ -544,7 +547,7 @@ public class Forge implements ApplicationListener {
|
|||||||
FScreen lastMatch = currentScreen;
|
FScreen lastMatch = currentScreen;
|
||||||
if (destroyThis && isLandscapeMode())
|
if (destroyThis && isLandscapeMode())
|
||||||
return;
|
return;
|
||||||
if (Dscreens.size() < 2 || (currentScreen == HomeScreen.instance && Forge.isPortraitMode)) {
|
if (Dscreens.size() < 2 || (currentScreen == HomeScreen.instance && isPortraitMode)) {
|
||||||
exit(false); //prompt to exit if attempting to go back from home screen
|
exit(false); //prompt to exit if attempting to go back from home screen
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user