// Methods /// Constructor public CharacterSelector() { sprites.Clear(); // Resizes the window HeadWars.Resize(570, 320); // Title labels.Add(new HLabel(Translation.GetString("character_selector"), Font.WindowTitle)); labels[0].setPosition(0, 0, "xcenter top"); // Next and Previous buttons.Add(new HButton(">>>>")); buttons[0].setPosition(110, 0, "xcenter ycenter"); buttons.Add(new HButton("<<<<")); buttons[1].setPosition(-110, 0, "xcenter ycenter"); // Select buttons.Add(new HButton(Translation.GetString("select"))); buttons[2].setPosition(-5, -5, "right bottom"); // Back to Menu buttons.Add(new HButton(Translation.GetString("button_back"))); buttons[3].setPosition(5, -5, "left bottom"); // Textures characterPanelTexture = new Texture2D(HeadWars.Instance.GraphicsDevice, 100, 100); characterPanelRectangle = new Rectangle((int)HeadWars.ScreenDimension.X / 2 - 50, (int)HeadWars.ScreenDimension.Y / 2 - 50, 100, 100); characterPosition = new Vector2(characterPanelRectangle.X + 50, characterPanelRectangle.Y + 50); characterPanelTexture.Border(20, Color.CadetBlue); // spriteData SetSprites(); NormalizeCharacter(); // Texts labels.Add(new HLabel("« " + GetSprite("name") + " »", Font.MediumTextBold)); labels[1].setPosition(0, -80, "xcenter ycenter"); labels[1].textColor(Color.Yellow); labels.Add(new HLabel(GetSprite("description"), Font.TextBold)); labels[2].setPosition(0, 80, "xcenter ycenter"); }