summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r--core/src/ch/asynk/rustanddust/menu/MainMenu.java10
-rw-r--r--core/src/ch/asynk/rustanddust/screens/MenuScreen.java30
2 files changed, 20 insertions, 20 deletions
diff --git a/core/src/ch/asynk/rustanddust/menu/MainMenu.java b/core/src/ch/asynk/rustanddust/menu/MainMenu.java
index 769adb3..ff65d50 100644
--- a/core/src/ch/asynk/rustanddust/menu/MainMenu.java
+++ b/core/src/ch/asynk/rustanddust/menu/MainMenu.java
@@ -13,7 +13,7 @@ public class MainMenu extends Menu
EXIT(0),
OPTIONS(1),
TUTORIALS(2),
- SCENARIOS(3),
+ PLAY(3),
NONE(4);
public int i;
Items(int i)
@@ -28,9 +28,9 @@ public class MainMenu extends Menu
{
super(Items.NONE, font, atlas.createPatch("typewriter"));
- label(Items.OPTIONS).write("Options");
+ label(Items.PLAY).write("Play");
label(Items.TUTORIALS).write("Tutorials");
- label(Items.SCENARIOS).write("Scenarios");
+ label(Items.OPTIONS).write("Options");
label(Items.EXIT).write("Exit");
this.visible = true;
@@ -49,8 +49,8 @@ public class MainMenu extends Menu
if (!visible) return ret;
- if (label(Items.SCENARIOS).hit(x, y)) {
- menuItem = Items.SCENARIOS;
+ if (label(Items.PLAY).hit(x, y)) {
+ menuItem = Items.PLAY;
ret = true;
} else if (label(Items.TUTORIALS).hit(x, y)) {
menuItem = Items.TUTORIALS;
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();
}