package com.ezardlabs.lostsector.levels;

import com.ezardlabs.dethsquare.Animator;
import com.ezardlabs.dethsquare.AudioSource;
import com.ezardlabs.dethsquare.AudioSource.AudioClip;
import com.ezardlabs.dethsquare.Camera;
import com.ezardlabs.dethsquare.GameObject;
import com.ezardlabs.dethsquare.GuiRenderer;
import com.ezardlabs.dethsquare.Level;
import com.ezardlabs.dethsquare.LevelManager;
import com.ezardlabs.dethsquare.Renderer;
import com.ezardlabs.dethsquare.Screen;
import com.ezardlabs.dethsquare.Vector2;
import com.ezardlabs.lostsector.objects.menus.MainMenuLiset;
import com.ezardlabs.lostsector.objects.menus.Menu;
import com.ezardlabs.lostsector.objects.menus.Menu.MenuAction;

public class MainMenuLevel extends Level {

	@Override
	public void onLoad() {
		GameObject.instantiate(new GameObject("Camera", new Camera(true)), new Vector2());

		GameObject.instantiate(
				new GameObject("Liset", new Renderer(), new Animator(), new MainMenuLiset(false)),
				new Vector2(Screen.width / 2 - 96 * 8 / 2, 75));

		GameObject.instantiate(new GameObject("MainMenuLogo",
						new GuiRenderer("images/menus/main/logo.png", 900, 225)),
				new Vector2(Screen.width / 2 - 450, 10));

		Menu m;
		GameObject.instantiate(new GameObject("MainMenu", m = new Menu(new String[]{"Explore",
						"Survival",
						"Procedural",
						"Multiplayer"},
						new MenuAction[]{(menu, index, text) -> LevelManager.loadLevel("explore"),
								(menu, index, text) -> LevelManager.loadLevel("survival"),
								(menu, index, text) -> LevelManager.loadLevel("procedural")},
						new Vector2(0, 250)),
						new AudioSource(new AudioClip("audio/this_is_what_you_are" + ".ogg"), true, 50)),
				new Vector2());
		m.open();
	}
}

@@ -1194,18 +1194,8 @@
 );%0A%0A
-%09%09Menu m;%0A
 %09%09Ga
@@ -1245,12 +1245,8 @@
 nu%22,
- m =
  new
@@ -1550,16 +1550,86 @@
 edural%22)
+,%0A%09%09%09%09%09%09%09%09(menu, index, text) -%3E LevelManager.loadLevel(%22multiplayer%22)
 %7D,%0A%09%09%09%09%09
@@ -1648,16 +1648,22 @@
 (0, 250)
+, true
 ),%0A%09%09%09%09%09
@@ -1769,20 +1769,8 @@
 ));%0A
-%09%09m.open();%0A
 %09%7D%0A%7D

Change to use new style of automatic menu opening