Exemple #1
0
        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);
        }
Exemple #2
0
        /** Creates an GuiAction based on this slots Action property. */
        protected void Sync()
        {
            if (Action == null)
            {
                _ddContent = null;
                return;
            }

            var content = (DDContent as GuiAction);

            if ((content == null) || !content.Action.CompareTo(Action))
            {
                _ddContent = new GuiAction(Action.Clone());
            }
        }