Ejemplo n.º 1
0
        public BlueSpellsKnownGump(Mobile from) : base(0, 0)
        {
            m_From = from;

            if (!BlueMageControl.IsBlueMage(m_From))
            {
                return;
            }

            this.Closable   = true;
            this.Disposable = true;
            this.Dragable   = true;
            this.Resizable  = false;

            bool[]           boollist = BlueMageControl.GetBoolList(m_From);
            int              count = 0, x = 0, y = 0;
            List <LabelInfo> labels = new List <LabelInfo>();

            for (int i = 0; i < boollist.Length; i++)
            {
                if (boollist[i])
                {
                    x = (count % 2) == 0 ? 15 : 140;
                    y = (((count / 2) - 1) * 25) + 125;
                    labels.Add(new LabelInfo(x, y, 1365, BlueSpellInfo.GetName(i), i));

                    count++;
                }
            }

            int knownY = labels.Count / 2 + 1;

            AddPage(0);

            AddBackground(0, 0, 190 + 80, 85, 9270);                            // Top layer
            AddBackground(0, 80, 190 + 80, (knownY * 25) + 30, 9270);           // Middle Layer
            AddBackground(0, 85 + (knownY * 25) + 30 - 10, 190 + 80, 85, 9270); // Bottem Layer

            AddImage(15, 15, 11013, 1365);                                      // Arms book
            AddLabel(60, 15, 1365, @"Blue Spells Known");

            AddLabel(28 + 40, 85 + (knownY * 25) + 25 + 12, 1365, @"Created By Peoharen");
            AddImage(75 + 40, 85 + (knownY * 25) + 25 + 32, 113, 1365);               // Virtue

            for (int i = 0; i < labels.Count; i++)
            {
                AddButton(labels[i].X, labels[i].Y + 5, 1209, 1210, labels[i].SpellNumber + 1, GumpButtonType.Reply, 0);
                AddButton(labels[i].X + 20, labels[i].Y + 3, 22153, 22154, labels[i].SpellNumber + 100, GumpButtonType.Reply, 0);
                AddLabel(labels[i].X + 40, labels[i].Y, labels[i].Hue, labels[i].Words);
            }
        }
Ejemplo n.º 2
0
        public BlueSpellInfoGump(int number) : base(0, 0)
        {
            this.Closable   = true;
            this.Disposable = true;
            this.Dragable   = true;
            this.Resizable  = false;

            AddPage(0);
            AddBackground(0, 0, 230, 155, 9270);               // Background
            string name = BlueSpellInfo.GetName(number);

            AddLabel(15, 15, 1365, name);               // Spell Name
            AddHtml(15, 40, 200, 100, GetDescription(number), true, true);
        }