/// <summary>Update labels to current values.</summary> private void UpdateStats() { GameState.Info.DisplayStats(); LblHeroName.Text = GameState.CurrentHero.Name; LblHeroHealth.Text = GameState.CurrentHero.Statistics.HealthToStringWithText; LblHeroMagic.Text = GameState.CurrentHero.Statistics.MagicToStringWithText; LblHeroShield.Text = HeroShieldToString; LblEnemyName.Text = GameState.CurrentEnemy.Name; LblEnemyHealth.Text = GameState.CurrentEnemy.Statistics.HealthToStringWithText; LblEnemyMagic.Text = GameState.CurrentEnemy.Statistics.MagicToStringWithText; LblEnemyShield.Text = EnemyShieldToString; LblSpellTypeAmount.Text = GameState.CurrentHero.CurrentSpell.TypeAmount; LblSpellCost.Text = GameState.CurrentHero.CurrentSpell.MagicCostToString; LblWeight.Text = GameState.CurrentHero.WeightToString; if (!GameState.CurrentHero.Overweight) { LblWeight.AddColorOverride("font_color", new Color(1, 1, 1, 1)); } else { LblWeight.AddColorOverride("font_color", new Color(255, 1, 1, 1)); } DisplaySpell(); CheckButtons(); }
/// <summary>Updates all the labels.</summary> public void UpdateLabels() { LblName.Text = GameState.CurrentHero.Name; LblLevel.Text = GameState.CurrentHero.LevelAndClassToString; LblExperience.Text = GameState.CurrentHero.ExperienceToStringWithText; LblSkillPoints.Text = GameState.CurrentHero.SkillPointsToString; LblHardcore.Text = GameState.CurrentHero.HardcoreToString; LblGold.Text = GameState.CurrentHero.GoldToStringWithText; LblWeight.Text = GameState.CurrentHero.WeightToString; if (!GameState.CurrentHero.Overweight) { LblWeight.AddColorOverride("font_color", new Color(1, 1, 1, 1)); } else { LblWeight.AddColorOverride("font_color", new Color(1, 0, 0, 1)); } UpdateAttributeLabels(); GameState.Info.DisplayStats(); }