Example #1
0
        public ChangeHairHueGump(
            Mobile from, Mobile vendor, int price, bool hair, bool facialHair, ChangeHairHueEntry[] entries)
            : base(50, 50)
        {
            m_From       = from;
            m_Vendor     = vendor;
            m_Price      = price;
            m_Hair       = hair;
            m_FacialHair = facialHair;
            m_Entries    = entries;

            from.CloseGump(typeof(HairstylistBuyGump));
            from.CloseGump(typeof(ChangeHairHueGump));
            from.CloseGump(typeof(ChangeHairstyleGump));

            AddPage(0);

            AddBackground(100, 10, 350, 370, 2600);
            AddBackground(120, 54, 110, 270, 5100);

            AddHtmlLocalized(155, 25, 240, 30, 1011013, false, false);  // <center>Hair Color Selection Menu</center>

            AddHtmlLocalized(150, 330, 220, 35, 1011014, false, false); // Dye my hair this color!
            AddButton(380, 330, 4005, 4007, 1, GumpButtonType.Reply, 0);

            for (int i = 0; i < entries.Length; ++i)
            {
                ChangeHairHueEntry entry = entries[i];

                AddLabel(130, 59 + (i * 22), entry.Hues[0] - 1, entry.Name);
                AddButton(207, 60 + (i * 22), 5224, 5224, 0, GumpButtonType.Page, 1 + i);
            }

            for (int i = 0; i < entries.Length; ++i)
            {
                ChangeHairHueEntry entry = entries[i];
                int[]  hues = entry.Hues;
                string name = entry.Name;

                AddPage(1 + i);

                for (int j = 0; j < hues.Length; ++j)
                {
                    AddLabel(278 + ((j / 16) * 80), 52 + ((j % 16) * 17), hues[j] - 1, name);
                    AddRadio(260 + ((j / 16) * 80), 52 + ((j % 16) * 17), 210, 211, false, (j * entries.Length) + i);
                }
            }
        }
Example #2
0
        public ChangeHairHueGump( Mobile from, Mobile vendor, int price, bool hair, bool facialHair, ChangeHairHueEntry[] entries )
            : base(50, 50)
        {
            m_From = from;
            m_Vendor = vendor;
            m_Price = price;
            m_Hair = hair;
            m_FacialHair = facialHair;
            m_Entries = entries;

            from.CloseGump( typeof( HairstylistBuyGump ) );
            from.CloseGump( typeof( ChangeHairHueGump ) );
            from.CloseGump( typeof( ChangeHairstyleGump ) );

            AddPage( 0 );

            AddBackground( 100, 10, 350, 370, 2600 );
            AddBackground( 120, 54, 110, 270, 5100 );

            AddHtmlLocalized( 155, 25, 240, 30, 1011013, false, false ); // <center>Hair Color Selection Menu</center>

            AddHtmlLocalized( 150, 330, 220, 35, 1011014, false, false ); // Dye my hair this color!
            AddButton( 380, 330, 4005, 4007, 1, GumpButtonType.Reply, 0 );

            for ( int i = 0; i < entries.Length; ++i )
            {
                ChangeHairHueEntry entry = entries[i];

                AddLabel( 130, 59 + (i * 22), entry.Hues[0] - 1, entry.Name );
                AddButton( 207, 60 + (i * 22), 5224, 5224, 0, GumpButtonType.Page, 1 + i );
            }

            for ( int i = 0; i < entries.Length; ++i )
            {
                ChangeHairHueEntry entry = entries[i];
                int[] hues = entry.Hues;
                string name = entry.Name;

                AddPage( 1 + i );

                for ( int j = 0; j < hues.Length; ++j )
                {
                    AddLabel( 278 + ((j / 16) * 80), 52 + ((j % 16) * 17), hues[j] - 1, name );
                    AddRadio( 260 + ((j / 16) * 80), 52 + ((j % 16) * 17), 210, 211, false, (j * entries.Length) + i );
                }
            }
        }