public EditorGUIController(Simulator simulator) { Simulator = simulator; GeneralMenu = new EditorGeneralMenu(simulator, new Vector3(400, 300, 0), VisualPriorities.Default.EditorGeneralMenu); Players = new Dictionary<EditorPlayer, EditorGUIPlayer>(); CelestialBodiesPathPreviews = new CelestialBodiesPathPreviews(Simulator); Panels = new Dictionary<EditorPanel, Panel>(EditorPanelComparer.Default); // Player's panel PlayerPanel playerPanel = new PlayerPanel(Simulator, Vector3.Zero, new Vector2(500, 500), VisualPriorities.Default.EditorPanel, Color.White) { Visible = false }; Panels.Add(EditorPanel.Player, playerPanel); // Turrets' panel TurretsPanel turretsPanel = new TurretsPanel(Simulator, Vector3.Zero, new Vector2(700, 500), VisualPriorities.Default.EditorPanel, Color.White) { Visible = false }; Panels.Add(EditorPanel.Turrets, turretsPanel); // PowerUps' panel PowerUpsPanel powerUpsPanel = new PowerUpsPanel(Simulator, Vector3.Zero, new Vector2(500, 500), VisualPriorities.Default.EditorPanel, Color.White) { Visible = false }; Panels.Add(EditorPanel.PowerUps, powerUpsPanel); // General panel GeneralPanel generalPanel = new GeneralPanel(Simulator, Vector3.Zero, new Vector2(500, 500), VisualPriorities.Default.EditorPanel, Color.White) { Visible = false }; Panels.Add(EditorPanel.General, generalPanel); // Background panel BackgroundsPanel backgroundPanel = new BackgroundsPanel(Simulator, Vector3.Zero, new Vector2(500, 500), VisualPriorities.Default.EditorPanel, Color.White) { Visible = false }; Panels.Add(EditorPanel.Background, backgroundPanel); // Waves panel WavesPanel wavesPanel = new WavesPanel(Simulator, Vector3.Zero, new Vector2(1000, 600), VisualPriorities.Default.EditorPanel, Color.White) { Visible = false }; Panels.Add(EditorPanel.Waves, wavesPanel); // Load panel LevelsPanel loadPanel = new LevelsPanel(Simulator.Scene, Vector3.Zero, new Vector2(800, 500), VisualPriorities.Default.EditorPanel, Color.White); loadPanel.SetTitle("Load"); loadPanel.Initialize(); Panels.Add(EditorPanel.Load, loadPanel); // Save panel LevelsPanel deletePanel = new LevelsPanel(Simulator.Scene, Vector3.Zero, new Vector2(800, 500), VisualPriorities.Default.EditorPanel, Color.White); deletePanel.SetTitle("Delete - No confirmation!!!"); deletePanel.Initialize(); Panels.Add(EditorPanel.Delete, deletePanel); ContextualMenusCollisions = new ContextualMenusCollisions(); }
public GUIController(Simulator simulator) { Simulator = simulator; StartingPathMenu = new StartingPathMenu(Simulator, VisualPriorities.Default.StartingPathMenu); GameMenu = new Simulation.GameMenu(Simulator, new Vector3(450, -320, 0)); MenuPowerUps = new PowerUpsMenu(Simulator, new Vector3(-550, 200, 0), VisualPriorities.Default.PowerUpsMenu); Players = new Dictionary<SimPlayer, GUIPlayer>(); ContextualMenusCollisions = new ContextualMenusCollisions(); HelpBar = new HelpBarPanel(simulator.Scene, VisualPriorities.Default.HelpBar) { Alpha = 0 }; GameBarPanel = new Simulation.GameBarPanel(Simulator, VisualPriorities.Default.GameBar); NextWavePreview = new NextWavePreview(simulator, VisualPriorities.Default.NextWavePreview); }