mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -202,6 +202,12 @@ public class Forge implements ApplicationListener {
|
||||
ImageCache.preloadCache(filteredkeys);
|
||||
}
|
||||
|
||||
public static void openHomeScreen(boolean openNewGameMenu) {
|
||||
openScreen(HomeScreen.instance);
|
||||
if(openNewGameMenu)
|
||||
HomeScreen.instance.openNewGamMenu();
|
||||
}
|
||||
|
||||
private void afterDbLoaded() {
|
||||
stopContinuousRendering(); //save power consumption by disabling continuous rendering once assets loaded
|
||||
|
||||
@@ -210,7 +216,7 @@ public class Forge implements ApplicationListener {
|
||||
SoundSystem.instance.setBackgroundMusic(MusicPlaylist.MENUS); //start background music
|
||||
destroyThis = false; //Allow back()
|
||||
Gdx.input.setCatchKey(Keys.MENU, true);
|
||||
openScreen(HomeScreen.instance);
|
||||
openHomeScreen(false);
|
||||
splashScreen = null;
|
||||
|
||||
boolean isLandscapeMode = isLandscapeMode();
|
||||
|
||||
@@ -135,6 +135,10 @@ public class HomeScreen extends FScreen {
|
||||
QuestWorld = questWorld;
|
||||
}
|
||||
|
||||
public void openNewGamMenu(){
|
||||
NewGameMenu.getPreferredScreen().open();
|
||||
}
|
||||
|
||||
public boolean getQuestCommanderMode() {
|
||||
return QuestCommander;
|
||||
}
|
||||
|
||||
@@ -77,14 +77,22 @@ public class ControlWinLose {
|
||||
|
||||
/** Action performed when "quit" button is pressed in default win/lose UI. */
|
||||
public void actionOnQuit() {
|
||||
boolean openHomeScreen = false;
|
||||
// Reset other stuff
|
||||
saveOptions();
|
||||
try { MatchController.getHostedMatch().endCurrentGame();
|
||||
try {
|
||||
if(MatchController.getHostedMatch().subGameCount > 0) {
|
||||
openHomeScreen = true;
|
||||
MatchController.getHostedMatch().subGameCount--;
|
||||
}
|
||||
MatchController.getHostedMatch().endCurrentGame();
|
||||
} catch (NullPointerException e) {}
|
||||
view.hide();
|
||||
if(humancount == 0) {
|
||||
Forge.back();
|
||||
}
|
||||
if (openHomeScreen)
|
||||
Forge.openHomeScreen(true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user