Beispiel #1
0
    public OptionsWindow()
    {
      Title = "Options (Switch tabs with LB and RB)";
      CanResize = false;
      CanDrag = false;
      HorizontalAlignment = HorizontalAlignment.Center;
      VerticalAlignment = VerticalAlignment.Center;

      var nameTextBlock = new TextBlock
      {
        Margin = new Vector4F(4),
        Text = "Your name:",
      };

      var nameTextBox = new TextBox
      {
        Margin = new Vector4F(4),
        HorizontalAlignment = HorizontalAlignment.Stretch,
        Text = "Player1",
      };

      var passwordTextBlock = new TextBlock
      {
        Margin = new Vector4F(4),
        Text = "Your password:"******"Difficulty:",
      };

      var easyRadioButton = new RadioButton
      {
        Margin = new Vector4F(4),
        HorizontalAlignment = HorizontalAlignment.Stretch,
        Content = new TextBlock { Text = "Easy" },
        GroupName = "Difficulty",
      };

      var normalRadioButton = new RadioButton
      {
        Margin = new Vector4F(4),
        HorizontalAlignment = HorizontalAlignment.Stretch,
        Content = new TextBlock { Text = "Normal" },
        GroupName = "Difficulty",
        IsChecked = true,
      };

      var hardRadioButton = new RadioButton
      {
        Margin = new Vector4F(4),
        HorizontalAlignment = HorizontalAlignment.Stretch,
        Content = new TextBlock { Text = "Hard" },
        GroupName = "Difficulty",
      };

      var modeTextBlock = new TextBlock
      {
        Margin = new Vector4F(4),
        Text = "Mode:",
      };

      var simulationRadioButton = new RadioButton
      {
        Margin = new Vector4F(4),
        HorizontalAlignment = HorizontalAlignment.Stretch,
        Content = new TextBlock { Text = "Simulation" },
        GroupName = "Mode",
      };

      var arcadeRadioButton = new RadioButton
      {
        Margin = new Vector4F(4),
        HorizontalAlignment = HorizontalAlignment.Stretch,
        Content = new TextBlock { Text = "Arcade" },
        GroupName = "Mode",
        IsChecked = true,
      };

      var generalPanel = new StackPanel
      {
        Margin = new Vector4F(4),
        HorizontalAlignment = HorizontalAlignment.Stretch,
      };
      generalPanel.Children.Add(nameTextBlock);
      generalPanel.Children.Add(nameTextBox);
      generalPanel.Children.Add(passwordTextBlock);
      generalPanel.Children.Add(passwordTextBox);
      generalPanel.Children.Add(difficultyTextBlock);
      generalPanel.Children.Add(easyRadioButton);
      generalPanel.Children.Add(normalRadioButton);
      generalPanel.Children.Add(hardRadioButton);
      generalPanel.Children.Add(modeTextBlock);
      generalPanel.Children.Add(simulationRadioButton);
      generalPanel.Children.Add(arcadeRadioButton);

      var generalTab = new TabItem
      {
        TabPage = generalPanel,
        Content = new TextBlock { Text = "General" },
      };

      var resolutionTextBlock = new TextBlock
      {
        Margin = new Vector4F(4),
        Text = "Resolution:",
      };

      var resolutionDropDownButton = new DropDownButton
      {
        Margin = new Vector4F(4),
        HorizontalAlignment = HorizontalAlignment.Stretch,
        MaxDropDownHeight = 400,
      };
      resolutionDropDownButton.Items.Add("640 x 400");
      resolutionDropDownButton.Items.Add("800 x 480");
      resolutionDropDownButton.Items.Add("1024 x 768");
      resolutionDropDownButton.Items.Add("1280 x 720");
      resolutionDropDownButton.Items.Add("1920 x 1080");
      resolutionDropDownButton.Items.Add("1920 x 1200");
      resolutionDropDownButton.SelectedIndex = 3;

      var qualityTextBlock = new TextBlock
      {
        Margin = new Vector4F(4),
        Text = "Quality:",
      };

      var qualityValueTextBlock = new TextBlock
      {
        Margin = new Vector4F(4),
      };

      var qualityTextPanel = new StackPanel
      {
        Orientation = Orientation.Horizontal,
      };
      qualityTextPanel.Children.Add(qualityTextBlock);
      qualityTextPanel.Children.Add(qualityValueTextBlock);

      var qualitySlider = new Slider
      {
        Margin = new Vector4F(4),
        HorizontalAlignment = HorizontalAlignment.Stretch,
        Minimum = 0,
        Maximum = 10,
        SmallChange = 1,        // This value is used when the user presses LEFT/RIGHT to move the slider.
        LargeChange = 1,        // This value is used when the user presses the slider (not the thumb).
      };

      // Each game object property (e.g. Slider.Minimum/Maximum/Margin/Value/...) has a Changing
      // and a Changed event. To use it, we have to get the property:
      GameProperty<float> sliderValueProperty = qualitySlider.Properties.Get<float>("Value");

      // We can use the Changing event to coerce the property value. For example: A normal slider
      // can have any values when dragged with the mouse. We can coerce the value to only allow
      // integer values!
      sliderValueProperty.Changing += (s, e) => e.CoercedValue = (float)Math.Round(e.CoercedValue);

      // We can use the Changed event to update dependent values. Here, we update the text block
      // text whenever the slider value changes.
      sliderValueProperty.Changed += (s, e) => qualityValueTextBlock.Text = qualitySlider.Value.ToString();

      // Initialize the slider value. This raises the Changing and Changed events, and the 
      // qualityValueTextBlock is updated too.
      qualitySlider.Value = 4;

      var graphicsPanel = new StackPanel
      {
        Margin = new Vector4F(4),
        HorizontalAlignment = HorizontalAlignment.Stretch,
      };
      graphicsPanel.Children.Add(resolutionTextBlock);
      graphicsPanel.Children.Add(resolutionDropDownButton);
      graphicsPanel.Children.Add(qualityTextPanel);
      graphicsPanel.Children.Add(qualitySlider);

      var graphicsTab = new TabItem
      {
        TabPage = graphicsPanel,
        Content = new TextBlock { Text = "Graphics" },
      };

      var tabControl = new TabControl
      {
        Width = 300,
        Height = 300,
        Margin = new Vector4F(4)
      };
      tabControl.Items.Add(generalTab);
      tabControl.Items.Add(graphicsTab);

      var okButton = new Button
      {
        Width = 100,
        Margin = new Vector4F(4),
        Content = new TextBlock { Text = "OK (START)" },
        IsDefault = true,
      };
      okButton.Click += OnOK;

      var cancelButton = new Button
      {
        Width = 100,
        Margin = new Vector4F(4),
        Content = new TextBlock { Text = "Cancel (BACK)" },
        IsCancel = true,
      };
      cancelButton.Click += OnCancel;

      var buttonPanel = new StackPanel
      {
        Orientation = Orientation.Horizontal,
        HorizontalAlignment = HorizontalAlignment.Center,
      };
      buttonPanel.Children.Add(okButton);
      buttonPanel.Children.Add(cancelButton);

      var mainPanel = new StackPanel
      {
        Margin = new Vector4F(4)
      };
      mainPanel.Children.Add(tabControl);
      mainPanel.Children.Add(buttonPanel);

      Content = mainPanel;
    }
Beispiel #2
0
    public AllControlsWindow(ContentManager content, IUIRenderer renderer)
    {
      Title = "All Controls (This window has a context menu!)";
      CanResize = false;

      // The window content is set to a horizontal stack panel that contains two vertical
      // stack panels. The controls are added to the vertical panels.

      // ----- Button with text content
      var button0 = new Button
      {
        Content = new TextBlock { Text = "Button" },
        Margin = new Vector4F(4),
      };

      // ----- Button with mixed content
      // The content of a button is usually a text block but can be any UI control.
      // Let's try a button with image + text.
      var buttonContentPanel = new StackPanel { Orientation = Orientation.Horizontal };
      buttonContentPanel.Children.Add(new Image
      {
        Width = 16,
        Height = 16,
        Texture = content.Load<Texture2D>("Icon")
      });

      buttonContentPanel.Children.Add(new TextBlock
      {
        Margin = new Vector4F(4, 0, 0, 0),
        Text = "Button with image",
        VerticalAlignment = VerticalAlignment.Center,
      });

      var button1 = new Button
      {
        Content = buttonContentPanel,
        Margin = new Vector4F(4),
      };

      // ----- Drop-down button
      var dropDown = new DropDownButton
      {
        HorizontalAlignment = HorizontalAlignment.Stretch,
        Margin = new Vector4F(4),
        MaxDropDownHeight = 250,
      };
      for (int i = 0; i < 20; i++)
      {
        dropDown.Items.Add("DropDownItem " + i);
      }
      dropDown.SelectedIndex = 0;

      // ----- Check box
      var checkBox = new CheckBox
      {
        Margin = new Vector4F(4),
        Content = new TextBlock { Text = "CheckBox" },
      };

      // ----- Group of radio buttons
      var radioButton0 = new RadioButton
      {
        Margin = new Vector4F(4, 8, 4, 4),
        Content = new TextBlock { Text = "RadioButton0" },
      };

      var radioButton1 = new RadioButton
      {
        Margin = new Vector4F(4, 2, 4, 2),
        Content = new TextBlock { Text = "RadioButton1" },
      };

      var radioButton2 = new RadioButton
      {
        Margin = new Vector4F(4, 2, 4, 4),
        Content = new TextBlock { Text = "RadioButton1" },
      };

      // ----- Progress bar with value
      var progressBar0 = new ProgressBar
      {
        IsIndeterminate = false,
        Value = 75,
        Margin = new Vector4F(4, 8, 4, 4),
        HorizontalAlignment = HorizontalAlignment.Stretch,
        Cursor = renderer.GetCursor("Wait"),
      };

      // ----- Progress bar without value (indeterminate)
      var progressBar1 = new ProgressBar
      {
        IsIndeterminate = true,
        Margin = new Vector4F(4),
        HorizontalAlignment = HorizontalAlignment.Stretch,
        Cursor = renderer.GetCursor("Wait"),
      };

      // ----- Slider connected with a text box.
      var slider = new Slider
      {
        Value = 60,
        Margin = new Vector4F(4),
        HorizontalAlignment = HorizontalAlignment.Stretch,
      };

      var sliderValue = new TextBlock
      {
        Margin = new Vector4F(4, 0, 4, 4),
        Text = "(Value = 60)",
        HorizontalAlignment = HorizontalAlignment.Right
      };

      // To connect the slider with the text box, we need to get the "Value" property.
      var valueProperty = slider.Properties.Get<float>("Value");
      // This property is a GameObjectProperty<float>. We can attach an event handler to 
      // the Changed event of the property.
      valueProperty.Changed += (s, e) => sliderValue.Text = "(Value = " + (int)e.NewValue + ")";

      // ----- Scroll bar
      var scrollBar = new ScrollBar
      {
        Style = "ScrollBarHorizontal",
        SmallChange = 1,
        LargeChange = 10,
        Value = 45,
        ViewportSize = 0.3f,
        Margin = new Vector4F(4),
        HorizontalAlignment = HorizontalAlignment.Stretch,
      };

      // Add the controls to the first vertical stack panel.
      var stackPanel0 = new StackPanel
      {
        Margin = new Vector4F(4),
      };
      stackPanel0.Children.Add(button0);
      stackPanel0.Children.Add(button1);
      stackPanel0.Children.Add(dropDown);
      stackPanel0.Children.Add(checkBox);
      stackPanel0.Children.Add(radioButton0);
      stackPanel0.Children.Add(radioButton1);
      stackPanel0.Children.Add(radioButton2);
      stackPanel0.Children.Add(progressBar0);
      stackPanel0.Children.Add(progressBar1);
      stackPanel0.Children.Add(slider);
      stackPanel0.Children.Add(sliderValue);
      stackPanel0.Children.Add(scrollBar);

      // ----- Group box
      var groupBox = new GroupBox
      {
        Title = "GroupBox",
        HorizontalAlignment = HorizontalAlignment.Stretch,
        Margin = new Vector4F(4),
        Content = new TextBlock
        {
          Margin = new Vector4F(4),
          Text = "GroupBox Content"
        }
      };

      // ----- Tab control with 3 tab items
      var tabItem0 = new TabItem
      {
        TabPage = new TextBlock { Margin = new Vector4F(4), Text = "Page 0" },
        Content = new TextBlock { Text = "Item 0" },
      };
      var tabItem1 = new TabItem
      {
        TabPage = new TextBlock { Margin = new Vector4F(4), Text = "Page 1" },
        Content = new TextBlock { Text = "Item 1" },
      };
      var tabItem2 = new TabItem
      {
        TabPage = new TextBlock { Margin = new Vector4F(4), Text = "Page 2" },
        Content = new TextBlock { Text = "Item 2" },
      };
      var tabControl = new TabControl
      {
        HorizontalAlignment = HorizontalAlignment.Stretch,
        Margin = new Vector4F(4),
      };
      tabControl.Items.Add(tabItem0);
      tabControl.Items.Add(tabItem1);
      tabControl.Items.Add(tabItem2);

      // ----- Scroll viewer showing an image
      var image = new Image
      {
        Texture = content.Load<Texture2D>("Sky"),
      };

      var scrollViewer = new ScrollViewer
      {
        Margin = new Vector4F(4),
        HorizontalAlignment = HorizontalAlignment.Stretch,
        MinHeight = 100,
        HorizontalOffset = 200,
        VerticalOffset = 200,
        Height = 200,
      };
      scrollViewer.Content = image;

      // ----- Text box
      var textBox0 = new TextBox
      {
        Margin = new Vector4F(4),
        Text = "The quick brown fox jumps over the lazy dog.",
        MaxLines = 1,
        HorizontalAlignment = HorizontalAlignment.Stretch,
      };

      // ----- Password box
      var textBox1 = new TextBox
      {
        Margin = new Vector4F(4),
        Text = "Secret password!",
        MaxLines = 1,
        IsPassword = true,
        HorizontalAlignment = HorizontalAlignment.Stretch,
      };

      // ----- Multi-line text box
      var textBox2 = new TextBox
      {
        Margin = new Vector4F(4),
        Text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eleifend, nulla semper vestibulum congue, lectus lectus aliquam magna, lobortis luctus sem magna sit amet elit. Integer at neque nec mi dapibus tincidunt. Maecenas elit quam, varius luctus rutrum ut, congue quis libero. In hac habitasse platea dictumst. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus eu ante eros. Etiam odio lectus, sagittis non dictum eu, faucibus vitae magna. Maecenas mi lorem, semper vel condimentum sit amet, vehicula quis nulla. Cras suscipit scelerisque orci, ac ullamcorper lorem egestas sed. Nulla facilisi. Nam justo enim, mollis nec condimentum non, consectetur vel purus. Curabitur ac diam vitae justo ultricies auctor.\n"
             + "Pellentesque interdum vehicula nisi sed congue. Etiam eget magna nec metus suscipit tincidunt et in lectus. Praesent sapien tortor, congue et semper eu, mattis ac lorem. Duis id est et justo tempus consectetur. Aliquam rutrum ullamcorper augue non varius. Fusce ornare lectus et ipsum lobortis ut venenatis tellus sodales. Proin venenatis scelerisque dui eu viverra. Pellentesque vitae risus eget tellus vehicula molestie et quis ante. Nulla imperdiet rhoncus ante, eu tristique ante euismod id. Sed varius varius hendrerit. Praesent massa tortor, gravida suscipit lacinia non, suscipit a ipsum. Integer vulputate, felis vitae consectetur bibendum, ante velit tincidunt nunc, in convallis erat dolor eu purus.",
        MinLines = 5,
        MaxLines = 5,
        HorizontalAlignment = HorizontalAlignment.Stretch,
      };

      // ----- Console (command prompt)
      var console = new Console
      {
        Margin = new Vector4F(4),
        HorizontalAlignment = HorizontalAlignment.Stretch,
        MinHeight = 100,
      };

      // Add the controls to the second vertical stack panel.
      var stackPanel1 = new StackPanel
      {
        Width = 250,
        Margin = new Vector4F(4),
      };
      stackPanel1.Children.Add(groupBox);
      stackPanel1.Children.Add(tabControl);
      stackPanel1.Children.Add(scrollViewer);
      stackPanel1.Children.Add(textBox0);
      stackPanel1.Children.Add(textBox1);
      stackPanel1.Children.Add(textBox2);
      stackPanel1.Children.Add(console);

      // Add the two vertical stack panel into a horizontal stack panel.
      var stackPanelHorizontal = new StackPanel
      {
        Orientation = Orientation.Horizontal
      };
      stackPanelHorizontal.Children.Add(stackPanel0);
      stackPanelHorizontal.Children.Add(stackPanel1);

      Content = stackPanelHorizontal;

      // ----- Add a context menu to the window. (Each UI control can have its own context menu.)
      ContextMenu = new ContextMenu();

      // Add menu items.
      for (int i = 0; i < 10; i++)
      {
        var menuItem = new MenuItem
        {
          Content = new TextBlock { Text = "MenuItem" + i },
        };
        ContextMenu.Items.Add(menuItem);
      }
    }
Beispiel #3
0
    private void CreateOptionsWindow()
    {
      if (_optionsWindow != null)
        return;

      // Add the Options window (v-sync, fixed/variable timing, parallel game loop).

      // Window
      //   TabControl

      _optionsWindow = new Window
      {
        Name = "OptionsWindow",
        Title = "Options",
        X = 50,
        Y = 50,
        Width = 400,
        MaxHeight = 640,
        HideOnClose = true,
        IsVisible = false,
      };
      _optionsWindow.Closed += OnWindowClosed;

      _optionsTabControl = new TabControl
      {
        HorizontalAlignment = HorizontalAlignment.Stretch,
        VerticalAlignment = VerticalAlignment.Stretch,
        Margin = new Vector4F(SampleHelper.Margin),
      };
      _optionsWindow.Content = _optionsTabControl;

      var panel = SampleHelper.AddTabItem(_optionsTabControl, "General");
      var graphicsDeviceManager = _services.GetInstance<GraphicsDeviceManager>();
      SampleHelper.AddCheckBox(
        panel,
        "Use fixed frame rate",
        _game.IsFixedTimeStep,
        value => _game.IsFixedTimeStep = value);

      SampleHelper.AddCheckBox(
        panel,
        "Enable V-Sync",
        graphicsDeviceManager.SynchronizeWithVerticalRetrace,
        value =>
        {
          graphicsDeviceManager.SynchronizeWithVerticalRetrace = value;
          graphicsDeviceManager.ApplyChanges();
        });

      SampleHelper.AddCheckBox(
        panel,
        "Enable parallel game loop",
        _game.EnableParallelGameLoop,
        value => _game.EnableParallelGameLoop = value);

      SampleHelper.AddButton(
        panel,
        "GC.Collect()",
        GC.Collect,
        "Force an immediate garbage collection.");
    }
        /// <summary>
        /// Load content for this game component
        /// </summary>
        protected override void LoadContent()
        {
            // TODO: Add your initialization code here
            var content = new ContentManager(Game.Services, "NeoforceTheme");
            Theme theme;
            theme = content.Load<Theme>("ThemeRed");

            // Create a UI renderer, which uses the theme info to renderer UI controls.
            var renderer = new UIRenderer(Game, theme);

            // Create a UIScreen and add it to the UI service. The screen is the root of
            // the tree of UI controls. Each screen can have its own renderer.
            _screen = new UIScreen("Default", renderer)
            {
                // Make the screen transparent.
                Background = new Color(0, 0, 0, 0),

            };
            var test = new Canvas()
            {
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment = VerticalAlignment.Stretch,
            };

            var maprender = new UIControls.GalaxyMapControl(Game.Services)
            {
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment = VerticalAlignment.Stretch,
            };
            var minimap = new UIControls.MinimapControl(Game.Services);
            var miniMapWindow = new MiniMapWindow()
            {
                Height = 200,
                Width = 200,
                HorizontalAlignment = HorizontalAlignment.Right,
                VerticalAlignment = VerticalAlignment.Bottom,
                Name = "MiniMap"
            };
            var controlButtonPanel = new StackPanel()
            {
                Orientation = Orientation.Horizontal,
                VerticalAlignment = VerticalAlignment.Bottom,
                HorizontalAlignment = HorizontalAlignment.Left
            };
            var testButton = new Button()
            {
                Height = 40,
                Width = 200
            };
            controlButtonPanel.Children.Add(testButton);
            miniMapWindow.Content = minimap;
            test.Children.Add(maprender);
            test.Children.Add(controlButtonPanel);
            test.Children.Add(miniMapWindow);

            var mainTabPanel = new TabControl
            {
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment = VerticalAlignment.Stretch
            };

            var systemMap = new UIControls.SystemMapControl(Game.Services)
            {
                Opacity = 5,
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment = VerticalAlignment.Stretch,
                ViewData = new SystemMapViewModel() { Rings = new[]
                                                                  {
                                                                      new SystemMapRingViewModel() { Planets = new[]
                                                                                                                   {
                                                                                                                       new SystemMapPlanetViewModel() { Name = "Planet 1", Scale = 1},
                                                                                                                       new SystemMapPlanetViewModel() { Name = "Planet 1 - Moon", Scale = 0.4f},
                                                                                                                   }},
                                                                      new SystemMapRingViewModel() { Planets = new[]
                                                                                                                   {
                                                                                                                       new SystemMapPlanetViewModel() { Name = "Planet 2", Scale = 0.5f},
                                                                                                                   }},
                                                                      new SystemMapRingViewModel() { Planets = new[]
                                                                                                                   {
                                                                                                                       new SystemMapPlanetViewModel() { Name = "Planet 3", Scale = 0.7f},
                                                                                                                       new SystemMapPlanetViewModel() { Name = "Planet 3 - Moon 1", Scale = 0.3f},
                                                                                                                       new SystemMapPlanetViewModel() { Name = "Planet 3 - Moon 2", Scale = 0.3f},
                                                                                                                   }},
                                                                      new SystemMapRingViewModel() { Planets = new[]
                                                                                                                   {
                                                                                                                       new SystemMapPlanetViewModel() { Name = "Planet 4", Scale = 0.2f},
                                                                                                                   }},
                                                                      new SystemMapRingViewModel() { Planets = new[]
                                                                                                                   {
                                                                                                                       new SystemMapPlanetViewModel() { Name = "Planet 5", Scale = 0.9f},
                                                                                                                   }},
                                                                      new SystemMapRingViewModel() { Planets = new[]
                                                                                                                   {
                                                                                                                       new SystemMapPlanetViewModel() { Name = "Planet 6", Scale = 0.6f},
                                                                                                                   }},
                                                                      new SystemMapRingViewModel() { Planets = new[]
                                                                                                                   {
                                                                                                                       new SystemMapPlanetViewModel() { Name = "Planet 7", Scale = 0.3f},
                                                                                                                   }},
                                                                      new SystemMapRingViewModel() { Planets = new[]
                                                                                                                   {
                                                                                                                       new SystemMapPlanetViewModel() { Name = "Planet 8", Scale = 0.5f},
                                                                                                                   }},
                                                                      new SystemMapRingViewModel() { Planets = new[]
                                                                                                                   {
                                                                                                                       new SystemMapPlanetViewModel() { Name = "Planet 9", Scale = 0.8f},
                                                                                                                       new SystemMapPlanetViewModel() { Name = "Planet 9 - Moon 1", Scale = 0.2f},
                                                                                                                       new SystemMapPlanetViewModel() { Name = "Planet 9 - Moon 2", Scale = 0.2f},
                                                                                                                       new SystemMapPlanetViewModel() { Name = "Planet 9 - Moon 3", Scale = 0.2f},
                                                                                                                       new SystemMapPlanetViewModel() { Name = "Planet 9 - Moon 4", Scale = 0.3f},
                                                                                                                   }}
                                                                  }}
            };

            var planetMap = new PlanetMapControl(Game.Services)
            {
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment = VerticalAlignment.Stretch,
                ViewData = new PlanetMapViewModel()
                               {
                                   Name = "Earth",
                                   BuildingCells = new[,]
                                                       {
                                                           { new BuildingCellViewModel(), new BuildingCellViewModel { Type = CellMultiplier.ExtraEnergy }, new BuildingCellViewModel() },
                                                           { new BuildingCellViewModel(), new BuildingCellViewModel(), new BuildingCellViewModel { Type = CellMultiplier.ExtraEnergy } },
                                                           { new BuildingCellViewModel { Type = CellMultiplier.ExtraEnergy }, new BuildingCellViewModel(), new BuildingCellViewModel() }
                                                       }
                               }
            };

            mainTabPanel.Items.Add(new TabItem() { Content = new TextBlock() { Text = "Star map" }, TabPage = test });
            mainTabPanel.Items.Add(new TabItem() { Content = new TextBlock() { Text = "System map" }, TabPage = systemMap });
            mainTabPanel.Items.Add(new TabItem() { Content = new TextBlock() { Text = "Planet map" }, TabPage = planetMap });

            _console = new ConsoleWindow(_consoleManager);

            StartMenuScreen start = new StartMenuScreen(Game.Services);
            start.Init();
            _screen.Children.Add(start);

            //_screen.Children.Add(mainTabPanel);
            //_screen.Children.Add(_console);
            //_screen.Children.Add(miniMapWindow);
            //_screen.Children.Add(maprender);

            // Add the screen to the UI service.
            _uiService.Screens.Add(_screen);

            base.LoadContent();
        }