public UseSpellButtonGump(SpellDefinition spell)
            : base(spell.ID, 0)
        {
            while (UserInterface.GetControl<UseSpellButtonGump>(spell.ID) != null)
            {
                UserInterface.GetControl<UseSpellButtonGump>(spell.ID).Dispose();
            }

            m_Spell = spell;
            m_World = ServiceRegistry.GetService<WorldModel>();

            IsMoveable = true;
            HandlesMouseInput = true;

            m_SpellButton = (GumpPic)AddControl(new GumpPic(this, 0, 0, spell.GumpIconSmallID, 0));
            LastControl.HandlesMouseInput = true;
            LastControl.MouseClickEvent += EventMouseClick;
        }
Beispiel #2
0
 private void CreateSpellPage(int page, bool rightPage, int circle, SpellDefinition spell)
 {
     // header: "NTH CIRCLE"
     AddControl(new HtmlGumpling(this, 64 + (rightPage ? 148 : 0), 10, 130, 200, 0, 0,
         string.Format("<span color='#004' style='font-family=uni0;'><center>{0}</center></span>", Magery.CircleNames[circle])),
         page);
     // icon and spell name
     AddControl(new HtmlGumpling(this, 56 + (rightPage ? 156 : 0), 38, 130, 44, 0, 0,
         string.Format("<a href='spellicon={0}'><gumpimg src='{1}'/></a>",
         spell.ID, spell.GumpIconID - 0x1298)),
         page);
     AddControl(new HtmlGumpling(this, 104 + (rightPage ? 156 : 0), 38, 88, 40, 0, 0, string.Format(
         "<a href='spell={0}' color='#542' hovercolor='#875' activecolor='#420' style='font-family=uni0; text-decoration=none;'>{1}</a>",
         spell.ID, spell.Name)),
         page);
     // reagents.
     AddControl(new HtmlGumpling(this, 56 + (rightPage ? 156 : 0), 84, 146, 106, 0, 0, string.Format(
         "<span color='#400' style='font-family=uni0;'>Reagents:</span><br/><span style='font-family=ascii6;'>{0}</span>", spell.CreateReagentListString(", "))),
         page);
 }