示例#1
0
        public PolymorphGump(Mobile caster, Item scroll) : base(50, 50)
        {
            this.m_Caster = caster;
            this.m_Scroll = scroll;

            int x, y;

            this.AddPage(0);
            this.AddBackground(0, 0, 585, 393, 5054);
            this.AddBackground(195, 36, 387, 275, 3000);
            this.AddHtmlLocalized(0, 0, 510, 18, 1015234, false, false);     // <center>Polymorph Selection Menu</center>
            this.AddHtmlLocalized(60, 355, 150, 18, 1011036, false, false);  // OKAY
            this.AddButton(25, 355, 4005, 4007, 1, GumpButtonType.Reply, 1);
            this.AddHtmlLocalized(320, 355, 150, 18, 1011012, false, false); // CANCEL
            this.AddButton(285, 355, 4005, 4007, 0, GumpButtonType.Reply, 2);

            y = 35;
            for (int i = 0; i < Categories.Length; i++)
            {
                PolymorphCategory cat = (PolymorphCategory)Categories[i];
                this.AddHtmlLocalized(5, y, 150, 25, cat.LocNumber, true, false);
                this.AddButton(155, y, 4005, 4007, 0, GumpButtonType.Page, i + 1);
                y += 25;
            }

            for (int i = 0; i < Categories.Length; i++)
            {
                PolymorphCategory cat = (PolymorphCategory)Categories[i];
                this.AddPage(i + 1);

                for (int c = 0; c < cat.Entries.Length; c++)
                {
                    PolymorphEntry entry = (PolymorphEntry)cat.Entries[c];
                    x = 198 + (c % 3) * 129;
                    y = 38 + (c / 3) * 67;

                    this.AddHtmlLocalized(x, y, 100, 18, entry.LocNumber, false, false);
                    this.AddItem(x + 20, y + 25, entry.ArtID);
                    this.AddRadio(x, y + 20, 210, 211, false, (c << 8) + i);
                }
            }
        }
示例#2
0
			public PolymorphCategory( int num, PolymorphEntry[] entries )
			{
				m_Num = num;
				m_Entries = entries;
			}