public LoadMapMenu(GraphicsDevice graphicsDevice, ContentManager Content, MenuHandler menuHandler, PuzzleEngineAlpha.Scene.MapHandlerScene mapHandler, PuzzleEngineAlpha.Level.TileMap tileMap) { this.tileMap = tileMap; miniMap = new PuzzleEngineAlpha.Level.MiniMap(Content, graphicsDevice, new Vector2(400, 300), new PuzzleEngineAlpha.Databases.Level.BinaryMapSerialization(), new PuzzleEngineAlpha.Databases.Level.BinaryLevelInfoSerialization()); components = new List <AGUIComponent>(); InitializeGUI(Content, menuHandler); backGround = Content.Load <Texture2D>(@"textures/whiteRectangle"); this.mapHandler = mapHandler; PuzzleEngineAlpha.Resolution.ResolutionHandler.Changed += ResetSizes; }
void InitializeEditorScenes(GraphicsDevice graphicsDevice, ContentManager content) { Level.Editor.EditorTileMap tileMap = new Level.Editor.EditorTileMap(Vector2.Zero, content, 64, 64, 64, 64, true); MapHandlerScene mapHandler = new MapHandlerScene(content, tileMap, new Databases.Level.BinaryLevelInfoSerialization(), new Databases.Level.BinaryMapSerialization()); this.activeScenes = editorScenes; editorScenes.Add("selectionActors", new Editor.SelectionSceneActors(graphicsDevice, content, 64, 64, new Vector2(170, Resolution.ResolutionHandler.WindowHeight - 215))); editorScenes.Add("selection", new Editor.SelectionScene(graphicsDevice, content, 64, 64, new Vector2(170, Resolution.ResolutionHandler.WindowHeight - 215))); editorScenes.Add("config", new Editor.ConfigurationScene(graphicsDevice, content, new Vector2(170, 210), editorScenes["selectionActors"], editorScenes["selection"])); editorScenes.Add("map", new Editor.MapScene(tileMap, graphicsDevice, content, 64, 64, Vector2.Zero, new Vector2(Resolution.ResolutionHandler.WindowWidth - 170, Resolution.ResolutionHandler.WindowHeight))); BringToFront("diagnostics"); editorScenes.Add("menu", new Editor.Menu.MenuHandler(content, graphicsDevice, mapHandler, tileMap, this)); editorScenes.Add("mapHandler", mapHandler); }