public TextBox(Vector2 position, string name, string defaultText = "", string backgroundText = "") : base(position) { Text = defaultText; // If there is some default text to be in the box this.backgroundText = backgroundText; Sprite = new Managers.Sprite("Menus/sliderBackground", 2, 1); Game1.GameWindow.TextInput += TextInputHandler; // Sets the input handler as a delegate the text input event handler }
public void CameraMouvement(Managers.Sprite Joueur) { Position = Joueur.Position; for (int i = 0; i < MainGame.life; i++) { MainGame.SLife[i].Position = new Vector2((_position.X - MainGame.ScreenX / 2) + i * 2.5f, _position.Y - MainGame.ScreenY / 2); } for (int i = 0; i < MainGame.mana; i++) { MainGame.SMana[i].Position = new Vector2((_position.X - MainGame.ScreenX / 2) + i * 2.5f, _position.Y - MainGame.ScreenY / 2 + 20); } }