private void ingB_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { PotionIngredientBox ingB = (PotionIngredientBox)sender; if (ingB.CraftingIngredient != null) { WorldController.player.getInventory().addIngredientToInventory(ingB.CraftingIngredient); ingB.CraftingIngredient = null; } }
private void ingB_MouseEnter(object sender, MouseEventArgs e) { PotionIngredientBox ingB = (PotionIngredientBox)sender; if (ingB.CraftingIngredient != null) { ToolTip tooltip = new ToolTip { Content = ConvertEffectsToString(ingB.CraftingIngredient.effects) }; ingB.ToolTip = tooltip; } }