/** Creates a new entry for given spell. */ private void createSpellEntry(MDRSpell spell) { var entry = new GuiSpellInfo(spell); entry.X = 0; entry.Y = ypos; Add(entry); ypos += entry.Height; }
public GuiSpellButton(MDRSpell spell) : base(spell.Icon) { _spell = spell; DragDropEnabled = true; ShowToolTipOnHover = true; MDRAction action = new MDRAction(ActionType.Spell, spell.ID); _ddContent = new GuiAction(action); }
public GuiSpellInfo(MDRSpell spell) : base(300, 50) { EnableBackground = true; Color = new Color(0.1f, 0.1f, 0.1f); spellButton = new GuiSpellButton(spell); spellButton.Width = 48; spellButton.Height = 48; Add(spellButton, 1, 0); spellInfoLabel = new GuiLabel(0, 0, ""); spellInfoLabel.FontSize = 11; string spellInfoString = "<B>" + spell.Name + "</B>\n" + spell.FormattedDescription(); spellInfoLabel.Caption = spellInfoString; Add(spellInfoLabel, 52, 0); }
/** Create a new instance of a spellCast gui object */ public GuiSpellCast(MDRSpell spell) : base(32, 32) { Spell = spell; }
// ---------------------------------------------- // Formating // ---------------------------------------------- /** Formats spell name, including coloring */ public static string Format(MDRSpell spell) { return(Util.Colorise(spell.Name, Colors.SPELL_COLOR)); }