public ConstructionMenuControl(string id, string _strControlHeader, DrawObj.Sprite _background)
        {
            ID = id;
            strControlHeader = _strControlHeader;
            menuBackground = _background;

            menuButtons = new List<FancyButtonControl>();
            destinationDropDown = new FancyDropDownBoxControl();
            facilityTypeDropDown = new FancyDropDownBoxControl();
        }
Exemple #2
0
        public ConstructionMenuControl(string id, string _strControlHeader, DrawObj.Sprite _background)
        {
            ID = id;
            strControlHeader = _strControlHeader;
            menuBackground   = _background;

            menuButtons          = new List <FancyButtonControl>();
            destinationDropDown  = new FancyDropDownBoxControl();
            facilityTypeDropDown = new FancyDropDownBoxControl();
        }
Exemple #3
0
        public ConstructionMenuControl()
        {
            ID               = "";
            _isNull          = true;
            strControlHeader = "";
            menuBackground   = new DrawObj.Sprite();

            menuButtons          = new List <FancyButtonControl>();
            destinationDropDown  = new FancyDropDownBoxControl();
            facilityTypeDropDown = new FancyDropDownBoxControl();
        }
        public ConstructionMenuControl()
        {
            ID = "";
            _isNull = true;
            strControlHeader = "";
            menuBackground = new DrawObj.Sprite();

            menuButtons = new List<FancyButtonControl>();
            destinationDropDown = new FancyDropDownBoxControl();
            facilityTypeDropDown = new FancyDropDownBoxControl();
        }
        public FancyDropDownBoxControl()
        {
            ID = "";
            _isEnabled = false;
            dropDownBoxArrow = new DrawObj.Sprite();
            dropDownBoxRect = new Rectangle();
            backColor = Color.White;

            borderColor = Color.Black;
            borderSize = 2;

            textOptions = new List<string>();
            selectedIndex = -1;
            dropDownCollapsed = true;

            maxItemsToShow = 20;
        }
        public FancyDropDownBoxControl()
        {
            ID               = "";
            _isEnabled       = false;
            dropDownBoxArrow = new DrawObj.Sprite();
            dropDownBoxRect  = new Rectangle();
            backColor        = Color.White;

            borderColor = Color.Black;
            borderSize  = 2;

            textOptions       = new List <string>();
            selectedIndex     = -1;
            dropDownCollapsed = true;

            maxItemsToShow = 20;
        }
        public void buildConstructionMenu(GameUpdateClassComponents curGameUpdateComponents, string btnID)
        {
            //GameEngine.Manufacturing.FacilityMFR

            if (btnID == "btnFacilityMFR")
            {
                Controls.GameEngineControls.ConstructionMenuControl buildConstructionMenu = new Controls.GameEngineControls.ConstructionMenuControl();

                DrawObj.Sprite menuBackImg = new DrawObj.Sprite();
                Vector2 curVector = new Vector2(100, 100);
                menuBackImg = new DrawObj.Sprite("ConstructionMenuBackground", curVector, curGameUpdateComponents._staticTextureImages._constructionMenu);

                Controls.FancyDropDownBoxControl ddlPlanet = new Controls.FancyDropDownBoxControl();
                ddlPlanet._isEnabled = true;
                ddlPlanet.backColor = Color.LightBlue;
                ddlPlanet.borderColor = Color.Black;

                Vector2 ddlPlanetsVector = new Vector2(370, 150);

                ddlPlanet.ID = "ddlPlanets";
                ddlPlanet.selectedIndex = 0;
                ddlPlanet.borderSize = 2;
                ddlPlanet.dropDownBoxRect = new Rectangle((int)ddlPlanetsVector.X, (int)ddlPlanetsVector.Y, 100, 25);

                List<DataCards.Planet> lstPlanets = new List<DataCards.Planet>();

                //lstPlanet.Add("Coruscant");
                //lstPlanet.Add("Corfai");
                //lstPlanet.Add("Corellia");

                lstPlanets = curGameUniverse.getAllPlanetsList();

                List<string> lstStrPlanetNames = new List<string>();

                foreach (DataCards.Planet curPlanet in lstPlanets)
                    lstStrPlanetNames.Add(curPlanet.Name);

                ddlPlanet.textOptions = lstStrPlanetNames;

                Vector2 ddlPlanetsArrowBoxVector = new Vector2(370, 150);
                ddlPlanet.dropDownBoxArrow = new DrawObj.Sprite("ddlPlanetsArrowbox", ddlPlanetsArrowBoxVector, curGameUpdateComponents._staticTextureImages._dropDownArrowTexture);

                buildConstructionMenu = new Controls.GameEngineControls.ConstructionMenuControl("facilContructMenu", "", menuBackImg);

                buildConstructionMenu.destinationDropDown = ddlPlanet;

                //Build facility type list
                Controls.FancyDropDownBoxControl ddlFacilityTypes = new Controls.FancyDropDownBoxControl();
                ddlFacilityTypes._isEnabled = true;
                ddlFacilityTypes.backColor = Color.LightSeaGreen;
                ddlFacilityTypes.borderColor = Color.Black;

                Vector2 ddlFacilityTypesVector = new Vector2(125, 200);

                ddlFacilityTypes.ID = "ddlFacilityTypes";
                ddlFacilityTypes.selectedIndex = 0;
                ddlFacilityTypes.borderSize = 2;
                ddlFacilityTypes.dropDownBoxRect = new Rectangle((int)ddlFacilityTypesVector.X, (int)ddlFacilityTypesVector.Y, 175, 25);

                List<string> lstFacilityTypes = new List<string>();

                lstFacilityTypes.Add("Starport");
                lstFacilityTypes.Add("Barracks");
                lstFacilityTypes.Add("ConstructionYard");

                ddlFacilityTypes.textOptions = lstFacilityTypes;

                Vector2 ddlFacilityTypesArrowBoxVector = new Vector2(125, 200);
                ddlFacilityTypes.dropDownBoxArrow = new DrawObj.Sprite("ddlFacilityTypesArrowbox", ddlFacilityTypesArrowBoxVector, curGameUpdateComponents._staticTextureImages._dropDownArrowTexture);

                //buildConstructionMenu = new Controls.GameEngineControls.ConstructionMenuControl("facilContructMenu", "", menuBackImg);

                buildConstructionMenu.facilityTypeDropDown = ddlFacilityTypes;

                //Button Time!!!

                //Add the Exit Button
                Vector2 vectExitBtn = new Vector2(300, 375);
                buildConstructionMenu.menuButtons.Add(new Controls.FancyButtonControl("btnExitManuFacilityMenu", curGameUpdateComponents._staticTextureImages._buttonTexture, vectExitBtn, new Rectangle((int)vectExitBtn.X, (int)vectExitBtn.Y, 130, 50), "Exit"));

                Vector2 vectConstructBtn = new Vector2(100, 375);
                buildConstructionMenu.menuButtons.Add(new Controls.FancyButtonControl("btnContructManuFacilityMenu", curGameUpdateComponents._staticTextureImages._buttonTexture, vectConstructBtn, new Rectangle((int)vectConstructBtn.X, (int)vectConstructBtn.Y, 130, 50), "Build"));

                ConstructionMenu = buildConstructionMenu;
            }//End btnFacilityMFR

            if (btnID == "btnShipMFR")
            {
                Controls.GameEngineControls.ConstructionMenuControl buildConstructionMenu = new Controls.GameEngineControls.ConstructionMenuControl();

                DrawObj.Sprite menuBackImg = new DrawObj.Sprite();
                Vector2 curVector = new Vector2(100, 100);
                menuBackImg = new DrawObj.Sprite("ConstructionMenuBackground", curVector, curGameUpdateComponents._staticTextureImages._constructionMenu);

                Controls.FancyDropDownBoxControl ddlPlanet = new Controls.FancyDropDownBoxControl();
                ddlPlanet._isEnabled = true;
                ddlPlanet.backColor = Color.LightBlue;
                ddlPlanet.borderColor = Color.Black;

                Vector2 ddlPlanetsVector = new Vector2(370, 150);

                ddlPlanet.ID = "ddlPlanets";
                ddlPlanet.selectedIndex = 0;
                ddlPlanet.borderSize = 2;
                ddlPlanet.dropDownBoxRect = new Rectangle((int)ddlPlanetsVector.X, (int)ddlPlanetsVector.Y, 100, 25);

                List<DataCards.Planet> lstPlanets = new List<DataCards.Planet>();

                lstPlanets = curGameUniverse.getAllPlanetsList();

                List<string> lstStrPlanetNames = new List<string>();

                foreach (DataCards.Planet curPlanet in lstPlanets)
                    lstStrPlanetNames.Add(curPlanet.Name);

                ddlPlanet.textOptions = lstStrPlanetNames;

                Vector2 ddlPlanetsArrowBoxVector = new Vector2(370, 150);
                ddlPlanet.dropDownBoxArrow = new DrawObj.Sprite("ddlPlanetsArrowbox", ddlPlanetsArrowBoxVector, curGameUpdateComponents._staticTextureImages._dropDownArrowTexture);

                buildConstructionMenu = new Controls.GameEngineControls.ConstructionMenuControl("shipContructMenu", "", menuBackImg);

                buildConstructionMenu.destinationDropDown = ddlPlanet;

                //Build facility type list
                Controls.FancyDropDownBoxControl ddlShipTypes = new Controls.FancyDropDownBoxControl();
                ddlShipTypes._isEnabled = true;
                ddlShipTypes.backColor = Color.LightSeaGreen;
                ddlShipTypes.borderColor = Color.Black;

                Vector2 ddlShipTypesVector = new Vector2(125, 200);

                ddlShipTypes.ID = "ddlShipTypes";
                ddlShipTypes.selectedIndex = 0;
                ddlShipTypes.borderSize = 2;
                ddlShipTypes.dropDownBoxRect = new Rectangle((int)ddlShipTypesVector.X, (int)ddlShipTypesVector.Y, 175, 25);

                List<string> lstShipTypes = new List<string>();

                lstShipTypes.Add("NebulonBFrigate");
                lstShipTypes.Add("ActionVITransport");
                lstShipTypes.Add("AurekTacticalStrikefighter");

                ddlShipTypes.textOptions = lstShipTypes;

                Vector2 ddlShipTypesArrowBoxVector = new Vector2(125, 200);
                ddlShipTypes.dropDownBoxArrow = new DrawObj.Sprite("ddlFacilityTypesArrowbox", ddlShipTypesArrowBoxVector, curGameUpdateComponents._staticTextureImages._dropDownArrowTexture);

                //buildConstructionMenu = new Controls.GameEngineControls.ConstructionMenuControl("facilContructMenu", "", menuBackImg);

                buildConstructionMenu.facilityTypeDropDown = ddlShipTypes;

                //Button Time!!!

                //Add the Exit Button
                Vector2 vectExitBtn = new Vector2(300, 375);
                buildConstructionMenu.menuButtons.Add(new Controls.FancyButtonControl("btnExitManuFacilityMenu", curGameUpdateComponents._staticTextureImages._buttonTexture, vectExitBtn, new Rectangle((int)vectExitBtn.X, (int)vectExitBtn.Y, 130, 50), "Exit"));

                Vector2 vectConstructBtn = new Vector2(100, 375);
                buildConstructionMenu.menuButtons.Add(new Controls.FancyButtonControl("btnContructManuShipMenu", curGameUpdateComponents._staticTextureImages._buttonTexture, vectConstructBtn, new Rectangle((int)vectConstructBtn.X, (int)vectConstructBtn.Y, 130, 50), "Build"));

                ConstructionMenu = buildConstructionMenu;
            }//End btnShipsMFR

            if (btnID == "btnTroopsMFR")
            {
                Controls.GameEngineControls.ConstructionMenuControl buildConstructionMenu = new Controls.GameEngineControls.ConstructionMenuControl();

                DrawObj.Sprite menuBackImg = new DrawObj.Sprite();
                Vector2 curVector = new Vector2(100, 100);
                menuBackImg = new DrawObj.Sprite("ConstructionMenuBackground", curVector, curGameUpdateComponents._staticTextureImages._constructionMenu);

                Controls.FancyDropDownBoxControl ddlPlanet = new Controls.FancyDropDownBoxControl();
                ddlPlanet._isEnabled = true;
                ddlPlanet.backColor = Color.LightBlue;
                ddlPlanet.borderColor = Color.Black;

                Vector2 ddlPlanetsVector = new Vector2(370, 150);

                ddlPlanet.ID = "ddlPlanets";
                ddlPlanet.selectedIndex = 0;
                ddlPlanet.borderSize = 2;
                ddlPlanet.dropDownBoxRect = new Rectangle((int)ddlPlanetsVector.X, (int)ddlPlanetsVector.Y, 100, 25);

                List<DataCards.Planet> lstPlanets = new List<DataCards.Planet>();

                lstPlanets = curGameUniverse.getAllPlanetsList();

                List<string> lstStrPlanetNames = new List<string>();

                foreach (DataCards.Planet curPlanet in lstPlanets)
                    lstStrPlanetNames.Add(curPlanet.Name);

                ddlPlanet.textOptions = lstStrPlanetNames;

                Vector2 ddlPlanetsArrowBoxVector = new Vector2(370, 150);
                ddlPlanet.dropDownBoxArrow = new DrawObj.Sprite("ddlPlanetsArrowbox", ddlPlanetsArrowBoxVector, curGameUpdateComponents._staticTextureImages._dropDownArrowTexture);

                buildConstructionMenu = new Controls.GameEngineControls.ConstructionMenuControl("troopsContructMenu", "", menuBackImg);

                buildConstructionMenu.destinationDropDown = ddlPlanet;

                //Build facility type list
                Controls.FancyDropDownBoxControl ddlTroopsTypes = new Controls.FancyDropDownBoxControl();
                ddlTroopsTypes._isEnabled = true;
                ddlTroopsTypes.backColor = Color.LightSeaGreen;
                ddlTroopsTypes.borderColor = Color.Black;

                Vector2 ddlTroopsTypesVector = new Vector2(125, 200);

                ddlTroopsTypes.ID = "ddlTroopsTypes";
                ddlTroopsTypes.selectedIndex = 0;
                ddlTroopsTypes.borderSize = 2;
                ddlTroopsTypes.dropDownBoxRect = new Rectangle((int)ddlTroopsTypesVector.X, (int)ddlTroopsTypesVector.Y, 175, 25);

                List<string> lstTroopsTypes = new List<string>();

                lstTroopsTypes.Add("ImperialGarrison");
                lstTroopsTypes.Add("StormTroopers");

                ddlTroopsTypes.textOptions = lstTroopsTypes;

                Vector2 ddlShipTypesArrowBoxVector = new Vector2(125, 200);
                ddlTroopsTypes.dropDownBoxArrow = new DrawObj.Sprite("ddlFacilityTypesArrowbox", ddlShipTypesArrowBoxVector, curGameUpdateComponents._staticTextureImages._dropDownArrowTexture);

                //buildConstructionMenu = new Controls.GameEngineControls.ConstructionMenuControl("facilContructMenu", "", menuBackImg);

                buildConstructionMenu.facilityTypeDropDown = ddlTroopsTypes;

                //Button Time!!!

                //Add the Exit Button
                Vector2 vectExitBtn = new Vector2(300, 375);
                buildConstructionMenu.menuButtons.Add(new Controls.FancyButtonControl("btnExitManuFacilityMenu", curGameUpdateComponents._staticTextureImages._buttonTexture, vectExitBtn, new Rectangle((int)vectExitBtn.X, (int)vectExitBtn.Y, 130, 50), "Exit"));

                Vector2 vectConstructBtn = new Vector2(100, 375);
                buildConstructionMenu.menuButtons.Add(new Controls.FancyButtonControl("btnContructManuTroopsMenu", curGameUpdateComponents._staticTextureImages._buttonTexture, vectConstructBtn, new Rectangle((int)vectConstructBtn.X, (int)vectConstructBtn.Y, 130, 50), "Build"));

                ConstructionMenu = buildConstructionMenu;
            }//End btnTroopsMFR

            if (btnID == "btnTroops")
            {

            }
        }