private void TechnologyListItemSelected(ScreenItemList list, ScreenItemListItem item)
        {
            if (_playerGame.CurrentResearch.Count >= 3)
            {
                return;
            }
            Research research = (Research)item.AttachedInformation;

            ScreenItemDialog researchDialog = new ScreenItemDialog(controls.Game, skin,
                 research.Name, true);
            researchDialog.AttachedInformation = research;
            researchDialog.Items.Add(new ScreenItemImage(controls.Game, skin, 250, 5, research.Icon));
            ScreenItemButton researchButton = new ScreenItemButton(controls.Game, skin, 250 +
                (float)((research.Icon.Width - 125) / 2), research.Icon.Height + 10, 125, 20, "Begin Research");
            researchButton.OnClick += delegate(ScreenItem screenItem, MouseEventArgs args)
            {
                item.Enabled = false;
                _playerGame.BeginResearch(research);
                ReassignResearchProgressBars();
                researchDialog.Close();
            };
            researchDialog.Items.Add(researchButton);
            ScreenItemLabel description = new ScreenItemLabel(controls.Game, skin, 5, 5, 10, 240, research.Description);
            description.TextAlignment = ScreenItemTextAlignment.Center;
            researchDialog.Items.Add(description);
            controls.OpenDialog = researchDialog;
            researchDialog.Closed += delegate() { controls.OpenDialog = null; };
        }
        public void Initialize(Game game)
        {
            interfaceBackground = game.Content.Load<Texture2D>(@"GUI\interface");
            mapWindow = new Rectangle(151, 0, game.GraphicsDevice.Viewport.Width - 151,
                game.GraphicsDevice.Viewport.Height - 133);
            minimapWindow = new Rectangle(917, 458, 102, 76);
            ScreenItemToggleButton _areaUrban = new ScreenItemToggleButton(game, 4,
                518, 41, 41, "areaSelection");
            _areaUrban.Toggled += new EventHandler(areaSelectionToggled);
            _areaUrban.Value = true;
            ScreenItemToggleButton _areaCountry = new ScreenItemToggleButton(game, 51,
                518, 41, 41, "areaSelection");
            _areaCountry.Toggled += new EventHandler(areaSelectionToggled);
            ScreenItemToggleButton _areaOcean = new ScreenItemToggleButton(game, 99,
                518, 41, 41, "areaSelection");
            _areaOcean.Toggled += new EventHandler(areaSelectionToggled);
            _screenItems.Add("areaSelection-Urban", _areaUrban);
            _screenItems.Add("areaSelection-Country", _areaCountry);
            _screenItems.Add("areaSelection-Ocean", _areaOcean);

            ScreenItemWindowButtons closeButton = new ScreenItemWindowButtons(game, GlobalSettings.ScreenWidth - 30, 10);
            closeButton.OnClick += new EventHandler(openCloseDialog);
            _screenItems.Add("windowButtons-Close", closeButton);

            ScreenItemProgressBar _ecoHealthBar = new ScreenItemProgressBar(game, 5, 29, 132, 23);
            _ecoHealthBar.MaxValue = 100;
            _ecoHealthBar.MinValue = 0;
            _ecoHealthBar.CurrentValue = 37;
            _ecoHealthBar.Text = "Eco-health";
            _screenItems.Add("ecoHealth-Bar", _ecoHealthBar);

            ScreenItemProgressBar _ecoHealthBarTwo = new ScreenItemProgressBar(game, 884, 402, 162, 24);
            _ecoHealthBarTwo.MaxValue = 100;
            _ecoHealthBarTwo.MinValue = 0;
            _ecoHealthBarTwo.CurrentValue = 37;
            _ecoHealthBarTwo.Text = "Eco-health";
            _screenItems.Add("ecoHealth2-Bar", _ecoHealthBarTwo);

            ScreenItemList _technologiesList = new ScreenItemList(game, 5, 98, 132, 24, "Technologies");
            _technologiesList.Items.Add(new ScreenItemListItem("Item 1"));
            _technologiesList.Items.Add(new ScreenItemListItem("Item 2"));
            _technologiesList.Items.Add(new ScreenItemListItem("Item 3"));
            ScreenItemList _buildingsList = new ScreenItemList(game, 5, 143, 132, 24, "Buildings");
            _buildingsList.Items.Add(new ScreenItemListItem("Building 1"));
            _buildingsList.Items.Add(new ScreenItemListItem("Building 2"));
            _buildingsList.Items.Add(new ScreenItemListItem("Building 3"));
            _buildingsList.ListItemSelected +=new EventHandler<ListItemSelectedEventHandler>(ListItemSelected);
            _technologiesList.ListItemSelected += new EventHandler<ListItemSelectedEventHandler>(ListItemSelected);
            _screenItems.Add("technologiesList", _technologiesList);
            _screenItems.Add("buildingsList", _buildingsList);

            ScreenItemButton _placeBuildingButton = new ScreenItemButton(game, 5, 200, 60, 60, "Place");
            _placeBuildingButton.OnClick += delegate(object snd, EventArgs args)
            {
                Map loadedMap = null;
                switch (_currentMap)
                {
                    case SimulationScreenMap.Urban: loadedMap = _playerGame.UrbanMap; break;
                    case SimulationScreenMap.Country: loadedMap = _playerGame.CountryMap; break;
                    case SimulationScreenMap.Ocean: loadedMap = _playerGame.OceanMap; break;
                }
                loadedMap.BeginBuildingPlacement(new SandboxBuilding(game));
            };
            _screenItems.Add("testBuilding", _placeBuildingButton);

            ScreenItemProgressBar resourceMoney = new ScreenItemProgressBar(game, 36, 222, 101, 24);
            resourceMoney.Text = "Money";
            _screenItems.Add("resource-Money", resourceMoney);
        }