public GameInformationMenu() { _isNull = true; _isEnabled = false; HeaderText = ""; Description = ""; menuVector = new Vector2(); dataCardType = GalacticConquest.Model.DataCardType.Unknown; menuButtons = new List<FancyButtonControl>(); scrlPnlDescriptionText = new Controls.ScrollPanel.ScrollPanelTextControl(); }
public void CreatePlanetInfoMenu(GameUpdateClassComponents curGameUpdateComponents, DataCards.Planet curPlanet) { //Create a Info Menu //Disable other controls this.disableAllControls(); Controls.GameInformationMenu newGameInfoMenu = new Controls.GameInformationMenu(); newGameInfoMenu.dataCardType = Model.DataCardType.Planet; newGameInfoMenu.imageToDisplay = curGameUpdateComponents._staticTextureImages._infoMenu; newGameInfoMenu.menuVector = new Vector2(100, 100); newGameInfoMenu.HeaderText = curPlanet.HeaderText; newGameInfoMenu.Description = curPlanet.Description; newGameInfoMenu.tag = curPlanet; newGameInfoMenu.Name = "menuInfo"; newGameInfoMenu._isEnabled = true; newGameInfoMenu._isNull = false; //Add the Scroll Panel Vector2 scrollPanelVector = new Vector2(550, 175); int spWidth = 320; int spHeight = 480; Rectangle scrollPanelRect = new Rectangle(Convert.ToInt32(scrollPanelVector.X), Convert.ToInt32(scrollPanelVector.Y), spWidth, spHeight); Controls.ScrollPanel.ScrollPanelTextControl scrlPnlDescription = new Controls.ScrollPanel.ScrollPanelTextControl(curGameUpdateComponents._staticTextureImages._scrollingPanel, scrollPanelVector, scrollPanelRect); newGameInfoMenu.scrlPnlDescriptionText = scrlPnlDescription; //Add the Exit Button newGameInfoMenu.menuButtons.Add(new Controls.FancyButtonControl("btnExitInfoMenu", curGameUpdateComponents._staticTextureImages._buttonTexture, new Vector2(365, 600), new Rectangle(365, 650, 130, 50), "Exit")); this.InfoMenu = newGameInfoMenu; }