public ChangeHairstyleGump(bool female, Mobile from, Mobile vendor, int price, bool facialHair, ChangeHairstyleEntry[] entries, GenderChangeToken token) : base(50, 50) { m_From = from; m_Vendor = vendor; m_Price = price; m_FacialHair = facialHair; m_Entries = entries; m_Female = female; m_Token = token; from.CloseGump(typeof(HairstylistBuyGump)); from.CloseGump(typeof(ChangeHairHueGump)); from.CloseGump(typeof(ChangeHairstyleGump)); int tableWidth = (m_FacialHair ? 2 : 3); int tableHeight = ((entries.Length + tableWidth - (m_FacialHair ? 1 : 2)) / tableWidth); int offsetWidth = 123; int offsetHeight = (m_FacialHair ? 70 : 65); AddPage(0); AddBackground(0, 0, 81 + (tableWidth * offsetWidth), 145 + (tableHeight * offsetHeight), 2600); AddButton(45, 90 + (tableHeight * offsetHeight), 4005, 4007, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(77, 90 + (tableHeight * offsetHeight), 90, 35, 1006044, false, false); // Ok AddButton( 90 + (tableWidth * offsetWidth) - 180, 85 + (tableHeight * offsetHeight), 4005, 4007, 0, GumpButtonType.Reply, 0); AddHtmlLocalized( 90 + (tableWidth * offsetWidth) - 148, 85 + (tableHeight * offsetHeight), 90, 35, 1006045, false, false); // Cancel if (!facialHair) { AddHtmlLocalized(50, 15, 350, 20, 1018353, false, false); // <center>New Hairstyle</center> } else { AddHtmlLocalized(55, 15, 200, 20, 1018354, false, false); // <center>New Beard</center> } for (int i = 0; i < entries.Length; ++i) { int xTable = i % tableWidth; int yTable = i / tableWidth; int gumpID = female ? entries[i].GumpID_Female : entries[i].GumpID_Male; if (gumpID == -1) { continue; } if (gumpID != 0) { AddRadio(40 + (xTable * offsetWidth), 70 + (yTable * offsetHeight), 208, 209, false, i); AddBackground(87 + (xTable * offsetWidth), 50 + (yTable * offsetHeight), 50, 50, 2620); int x = entries[i].X; int y = entries[i].Y; if (gumpID == 1841) { x -= 17; y -= 17; } AddImage(87 + (xTable * offsetWidth) + x, 50 + (yTable * offsetHeight) + y, gumpID); } else if (!facialHair) { AddRadio(40 + ((xTable) * offsetWidth), 240, 208, 209, false, i); AddHtmlLocalized(60 + ((xTable) * offsetWidth), 240, 200, 40, 1011064, false, false); // Bald } else { AddRadio(40 + (xTable * offsetWidth), 70 + (yTable * offsetHeight), 208, 209, false, i); //AddHtmlLocalized(60 + (xTable * offsetWidth), 70 + (yTable * offsetHeight), 85, 35, 1011064, false, false); // Bald } } }
public ChangeHairstyleGump(Mobile from, Mobile vendor, int price, bool facialHair, ChangeHairstyleEntry[] entries, GenderChangeToken token) : this(from.Female, from, vendor, price, facialHair, entries, token) { }