private void CreateControls() { var leftTexture = Game.Content.Load<Texture2D>(@"GUI\leftarrowUp"); var rightTexture = Game.Content.Load<Texture2D>(@"GUI\rightarrowUp"); var stopTexture = Game.Content.Load<Texture2D>(@"GUI\StopBar"); _backgroundImage = new PictureBox( Game.Content.Load<Texture2D>(@"Backgrounds\startScreen"), GameRef.ScreenRectangle); ControlManager.Add(_backgroundImage); var label1 = new Label { Text = "Who shall Thy be?" }; label1.Size = label1.SpriteFont.MeasureString(label1.Text); label1.Position = new Vector2((GameRef.Window.ClientBounds.Width - label1.Size.X) / 2, 150); ControlManager.Add(label1); _genderSelector = new LeftRightSelector(leftTexture, rightTexture, stopTexture); _genderSelector.SetItems(_genderItems, 125); _genderSelector.Position = new Vector2(label1.Position.X, 200); ControlManager.Add(_genderSelector); _classSelector = new LeftRightSelector(leftTexture, rightTexture, stopTexture); _classSelector.SetItems(_classItems, 125); _classSelector.Position = new Vector2(label1.Position.X, 250); ControlManager.Add(_classSelector); var linklabel1 = new LinkLabel {Text = "Accept", Position = new Vector2(label1.Position.X, 300)}; linklabel1.Selected += linklabel1_Selected; ControlManager.Add(linklabel1); ControlManager.NextControl(); }
private void CreateControls() { Texture2D leftTexture = Game.Content.Load<Texture2D>(@"GUI\leftarrowUp"); Texture2D rightTexture = Game.Content.Load<Texture2D>(@"GUI\rightarrowUp"); Texture2D stopTexture = Game.Content.Load<Texture2D>(@"GUI\StopBar"); backgroundImage = new PictureBox( Game.Content.Load<Texture2D>(@"Backgrounds\titlescreen"), GameRef.ScreenRectangle); ControlManager.Add(backgroundImage); Label label1 = new Label(); label1.Text = "Who will search for the Eyes of the Dragon?"; label1.Size = label1.SpriteFont.MeasureString(label1.Text); label1.Position = new Vector2((GameRef.Window.ClientBounds.Width - label1.Size.X) / 2, 150); ControlManager.Add(label1); genderSelector = new LeftRightSelector(leftTexture, rightTexture, stopTexture); genderSelector.SetItems(genderItems, 125); genderSelector.Position = new Vector2(label1.Position.X, 200); genderSelector.SelectionChanged += new EventHandler(selectionChanged); ControlManager.Add(genderSelector); classSelector = new LeftRightSelector(leftTexture, rightTexture, stopTexture); classSelector.SetItems(classItems, 125); classSelector.Position = new Vector2(label1.Position.X, 250); classSelector.SelectionChanged += selectionChanged; ControlManager.Add(classSelector); LinkLabel linkLabel1 = new LinkLabel(); linkLabel1.Text = "Accept this character."; linkLabel1.Position = new Vector2(label1.Position.X, 300); linkLabel1.Selected += new EventHandler(linkLabel1_Selected); ControlManager.Add(linkLabel1); characterImage = new PictureBox( characterImages[0, 0], new Rectangle(500, 200, 96, 96), new Rectangle(0, 0, 32, 32)); ControlManager.Add(characterImage); ControlManager.NextControl(); }
private void CreateControls() { Texture2D leftTexture = Game.Content.Load<Texture2D>(@"GUI/leftarrow"); Texture2D righTexture = Game.Content.Load<Texture2D>(@"GUI/rightarrow"); Texture2D stopTexture = Game.Content.Load<Texture2D>(@"GUI/stopshield"); backgroundImage = new PictureBox(Game.Content.Load<Texture2D>(@"Backgrounds/title"), gameRef.ScreenRectangle); ControlManager.Add(backgroundImage); Label label = new Label(); label.Text = "Predict The Chosen One"; label.Size = label.SpriteFont.MeasureString(@"Fonts/ControlFont"); label.Position = new Vector2((gameRef.Window.ClientBounds.Width - label.Size.X) / 2 - 25, 400); ControlManager.Add(label); genderSelector = new LeftRightSelector(leftTexture, righTexture, stopTexture); genderSelector.SetItems(genderItems, 40); genderSelector.Position = new Vector2(395, 475); genderSelector.Selected += new EventHandler(SelectionChanged); ControlManager.Add(genderSelector); classSelector = new LeftRightSelector(leftTexture, righTexture, stopTexture); classSelector.SetItems(classItems, 40); classSelector.Position = new Vector2(395, 550); classSelector.Selected += SelectionChanged; ControlManager.Add(classSelector); LinkLabel link = new LinkLabel(); link.Text = "Accept His Fate"; link.Position = new Vector2(label.Position.X + 45, 625); link.Selected = new EventHandler(LinkLabel_Selected); ControlManager.Add(link); characterBox = new PictureBox(characterImages[0,0], new Rectangle(470,260,96,96), new Rectangle(0,0,32,32)); ControlManager.Add(characterBox); ControlManager.NextControl(); }