public SaveMapScreen(EditorMapManager MapManager) : base("") { SaveButton = new MenuButton(new SaveButtonStyle(ScreenManager.Game.Content)); CancelButton = new MenuButton(new CancelButtonStyle(ScreenManager.Game.Content)); NameInput = new TextInputField(new MapNameInputStyle(ScreenManager.Game.Content)); MenuEntries.Add(SaveButton); MenuEntries.Add(CancelButton); MenuEntries.Add(NameInput); IsPopup = true; mapManager = MapManager; }
public LoadMapScreen(EditorMapManager MapManager) : base("") { LoadButton = new MenuButton(new LoadButtonStyle(ScreenManager.Game.Content)); DeleteButton = new MenuButton(new DeleteButtonStyle(ScreenManager.Game.Content)); CancelButton = new MenuButton(new CancelButtonStyle(ScreenManager.Game.Content)); SavedMapList = new List(new LoadMapListStyle(ScreenManager.Game.Content)); TitleTexture = ScreenManager.Game.Content.Load<Texture2D>("Editor/LoadMap/LoadLable"); for (int i = 0; i < FileLoader.LoadedGameData.MapList.Count; i++) { SavedMapList.AddItem(FileLoader.LoadedGameData.MapList[i], new LoadMapListItemStyle(ScreenManager.Game.Content)); } MenuEntries.Add(LoadButton); MenuEntries.Add(DeleteButton); MenuEntries.Add(CancelButton); MenuEntries.Add(SavedMapList); IsPopup = true; mapManager = MapManager; }
public override void Activate() { FileManagement.FileLoader.Initialize(); ToolPositionsManager.LoadData(); if (EditorMapManager == null) EditorMapManager = new EditorMapManager(ScreenManager.Game.Content, ScreenManager.SpriteBatch); EditorMapManager.Initialize(); EditorMapManager.Offset = new Vector2(260, 45); LightingManager.Initialize(ScreenManager.Game.GraphicsDevice, EditorMapManager.NumXTiles * EditorMapManager.TileSize, EditorMapManager.NumYTiles * EditorMapManager.TileSize); LightingManager.DrawOffset = new Vector2(260, 45); LightingManager.LoadContent(ScreenManager.Game.Content); for (int i = 0; i < ToolButtons.Count; i++) { GUIObject button = ToolButtons[i]; button.Position = ToolPositionsManager.GetPosition("Tool" + i); } }