private void Enter(object sender, KeyEventArgs e) { CharacterMethods.Name = NameCharacter.Text; CharacterMenu characterMenu = new CharacterMenu(CharacterMethods.CreateCharacter()); characterMenu.Show(); Close(); }
private void Okay_Button_Click(object sender, RoutedEventArgs e) { CharacterMethods.Name = NameCharacter.Text; CharacterMenu characterMenu = new CharacterMenu(CharacterMethods.CreateCharacter()); characterMenu.Show(); Close(); }
public CharacterMenu(Combatant hero) { InitializeComponent(); WindowPositioner.CenterWindowOnScreen(this); HP_Bar.Maximum = hero.MaxHP; MP_Bar.Maximum = hero.MaxMP; HP_Bar.Minimum = 0; MP_Bar.Minimum = 0; HP_Bar.Value = hero.HP; MP_Bar.Value = hero.MP; PrintHero(hero); ShowHeroImage(hero); StoredCombatants.Hero = hero; if (CharacterMethods.CharacterCreated == false) { CharacterMethods.InitializeInventoryAndSpells(StoredCombatants.Hero); CharacterMethods.CharacterCreated = true; } }