private void InitializeComponents() { btnEat = new Button(this, Game) { Position = new Point(0, 0), Size = new Point(96, 32), AssetName = "Textures/UI/Transparent/Buttons/Button_Eat", }; //btnEat.OnClick += btnEatClick; lblDummy = new Label(this, Game) { Position = new Point(0, 40) }; AddChildren(btnEat, lblDummy); }
private void InitializeComponents() { var linespacing = 16; lblPlayerName = new Label(this, Game) { Position = new Point(8, 8), }; lblPlayerTurn = new Label(this, Game) { Position = new Point(8, lblPlayerName.Position.Y + (2 * linespacing)), }; lblPlayerHitPoints = new Label(this, Game) { Position = new Point(8, lblPlayerTurn.Position.Y + linespacing) }; lblPlayerStrength = new Label(this, Game) { Position = new Point(8, lblPlayerHitPoints.Position.Y + linespacing) }; lblPlayerFood = new Label(this, Game) { Position = new Point(8, lblPlayerStrength.Position.Y + linespacing) }; lblPlayerMana = new Label(this, Game) { Position = new Point(8, lblPlayerFood.Position.Y + linespacing) }; lblPlayerArmorClass = new Label(this, Game) { Position = new Point(8, lblPlayerMana.Position.Y + linespacing) }; lblPlayerSpeed = new Label(this, Game) { Position = new Point(8, lblPlayerArmorClass.Position.Y + linespacing) }; lblPlayerName.Name = nameof(lblPlayerName); AddChildren(lblPlayerName, lblPlayerTurn, lblPlayerHitPoints, lblPlayerStrength, lblPlayerFood, lblPlayerMana, lblPlayerArmorClass, lblPlayerSpeed); }