summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/screens
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-11-05 09:43:07 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-11-05 09:43:07 +0100
commit9c3e23977e80a17153a0c908ba258a7ec0624741 (patch)
treeb45da5c2b374b8d079fe76355db2895d47d27ad6 /core/src/ch/asynk/rustanddust/screens
parent523bfbe43633931ef4d2a331969ee9d1a47b9fcd (diff)
downloadRustAndDust-9c3e23977e80a17153a0c908ba258a7ec0624741.zip
RustAndDust-9c3e23977e80a17153a0c908ba258a7ec0624741.tar.gz
menu/screens : use PlayMenu
Diffstat (limited to 'core/src/ch/asynk/rustanddust/screens')
-rw-r--r--core/src/ch/asynk/rustanddust/screens/MenuScreen.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/core/src/ch/asynk/rustanddust/screens/MenuScreen.java b/core/src/ch/asynk/rustanddust/screens/MenuScreen.java
index 0ca8a63..97d5637 100644
--- a/core/src/ch/asynk/rustanddust/screens/MenuScreen.java
+++ b/core/src/ch/asynk/rustanddust/screens/MenuScreen.java
@@ -15,8 +15,8 @@ import com.badlogic.gdx.math.Interpolation;
import ch.asynk.rustanddust.RustAndDust;
import ch.asynk.rustanddust.ui.Position;
import ch.asynk.rustanddust.menu.MainMenu;
+import ch.asynk.rustanddust.menu.PlayMenu;
import ch.asynk.rustanddust.menu.OptionsMenu;
-import ch.asynk.rustanddust.menu.ScenariosMenu;
import ch.asynk.rustanddust.menu.TutorialsMenu;
public class MenuScreen implements Screen
@@ -49,8 +49,8 @@ public class MenuScreen implements Screen
private Sprite usFlag;
private MainMenu mainMenu;
+ private PlayMenu playMenu;
private OptionsMenu optionsMenu;
- private ScenariosMenu scenariosMenu;
private TutorialsMenu tutorialsMenu;
private final MenuCamera camera;
@@ -79,8 +79,8 @@ public class MenuScreen implements Screen
this.geFlag = new Sprite(game.menuAtlas.findRegion("ge-flag"));
this.mainMenu = new MainMenu(game.fontB, game.uiAtlas);
+ this.playMenu = new PlayMenu(game, game.fontB, game.uiAtlas);
this.optionsMenu = new OptionsMenu(game, game.fontB, game.uiAtlas);
- this.scenariosMenu = new ScenariosMenu(game, game.fontB, game.uiAtlas);
this.tutorialsMenu = new TutorialsMenu(game, game.fontB, game.uiAtlas);
this.game.config.battle = null;
@@ -101,15 +101,15 @@ public class MenuScreen implements Screen
mainMenu.visible = false;
showNextMenu();
return true;
- } else if (optionsMenu.hit(x, y)) {
+ } else if (playMenu.hit(x, y)) {
mainMenu.visible = true;
- optionsMenu.visible = false;
+ playMenu.visible = false;
+ if (playMenu.launch)
+ startLoading();
return true;
- } else if (scenariosMenu.hit(x, y)) {
+ } else if (optionsMenu.hit(x, y)) {
mainMenu.visible = true;
- scenariosMenu.visible = false;
- if (scenariosMenu.launch)
- startLoading();
+ optionsMenu.visible = false;
return true;
} else if (tutorialsMenu.hit(x, y)) {
mainMenu.visible = true;
@@ -124,10 +124,10 @@ public class MenuScreen implements Screen
{
MainMenu.Items item = mainMenu.getMenu();
- if (item == MainMenu.Items.OPTIONS)
+ if (item == MainMenu.Items.PLAY)
+ playMenu.visible = true;
+ else if (item == MainMenu.Items.OPTIONS)
optionsMenu.visible = true;
- else if (item == MainMenu.Items.SCENARIOS)
- scenariosMenu.visible = true;
else if (item == MainMenu.Items.TUTORIALS)
tutorialsMenu.visible = true;
}
@@ -183,8 +183,8 @@ public class MenuScreen implements Screen
batch.setProjectionMatrix(camera.uiCombined());
batch.begin();
mainMenu.draw(batch);
+ playMenu.draw(batch);
optionsMenu.draw(batch);
- scenariosMenu.draw(batch);
tutorialsMenu.draw(batch);
batch.end();
}
@@ -210,8 +210,8 @@ public class MenuScreen implements Screen
setCenteredPosition(geFlag, xPath[n - 1], yPath[n - 1]);
mainMenu.setPosition();
+ playMenu.setPosition();
optionsMenu.setPosition();
- scenariosMenu.setPosition();
tutorialsMenu.setPosition();
}
@@ -225,8 +225,8 @@ public class MenuScreen implements Screen
public void dispose()
{
mainMenu.dispose();
+ playMenu.dispose();
optionsMenu.dispose();
- scenariosMenu.dispose();
tutorialsMenu.dispose();
}