public GBuyGump_OfferMenu(GBuyGump owner) : base(0x871, 170, 0xd6) { string str; this.m_Owner = owner; Mobile player = World.Player; if (((player != null) && ((str = player.Name) != null)) && ((str = str.Trim()).Length > 0)) { this.m_Signature = new GLabel(str, Engine.GetFont(5), Hues.Load(0x455), 0x48, 0xc2); this.m_Signature.Visible = false; base.m_Children.Add(this.m_Signature); } base.m_Children.Add(new GLabel((player != null) ? player.Gold.ToString() : "0", Engine.GetFont(6), Hues.Default, 0xbc, 0xa7)); this.m_Total = new GLabel("0", Engine.GetFont(6), Hues.Default, 0x44, 0xa7); this.m_Accept = new GBuyAccept(owner); this.m_Clear = new GBuyClear(owner); base.m_Children.Add(this.m_Total); base.m_Children.Add(this.m_Accept); base.m_Children.Add(this.m_Clear); base.m_CanDrag = true; base.m_QuickDrag = true; GVSlider toAdd = new GVSlider(0x828, 0xed, 0x51, 0x22, 0x3a, 0.0, 0.0, 50.0, 1.0); this.m_Slider = toAdd; base.m_Children.Add(toAdd); base.m_Children.Add(new GHotspot(0xed, 0x42, 0x22, 0x54, toAdd)); }
public GServerList(Server[] servers, int x, int y, int width, int height, int gumpID, IFont font, IHue hue, int selectionBorderColor, int selectionFillColor, int selectionFillAlpha) : base(gumpID, width, height, x, y, true) { this.m_xLast = -2147483648; this.m_yLast = -2147483648; int offsetX = base.OffsetX; int offsetY = base.OffsetY; int useWidth = base.UseWidth; this.m_Entries = new GServerEntry[servers.Length]; for (int i = 0; i < servers.Length; i++) { this.m_Entries[i] = new GServerEntry(servers[i], font, hue, offsetX, offsetY, useWidth, selectionBorderColor, selectionFillColor, ((float)selectionFillAlpha) / 255f); offsetY += this.m_Entries[i].Height - 1; base.m_Children.Add(this.m_Entries[i]); } offsetY++; offsetY -= base.OffsetY; if (offsetY > (base.UseHeight - 2)) { base.m_Children.Add(new GImage(0x101, this.Width - 6, 4)); base.m_Children.Add(new GImage(0xff, this.Width - 6, this.Height - 0x25)); for (int j = 0x22; (j + 0x20) < (this.Height - 5); j += 30) { base.m_Children.Add(new GImage(0x100, this.Width - 6, j)); } base.m_NonRestrictivePicking = true; this.m_Slider = new GVSlider(0xfe, this.Width - 5, 0x11, 13, 0xec, 0.0, 0.0, (double)(offsetY - (base.UseHeight - 2)), 1.0); this.m_Slider.OnValueChange = new OnValueChange(this.OnScroll); this.m_Slider.ScrollOffset = 20.0; base.m_Children.Add(this.m_Slider); base.m_Children.Add(new GHotspot(this.Width - 6, 4, 15, this.Height - 9, this.m_Slider)); } }
public GServerList(Server[] servers, int x, int y, int width, int height, int gumpID, IFont font, IHue hue, int selectionBorderColor, int selectionFillColor, int selectionFillAlpha) : base(gumpID, width, height, x, y, true) { this.m_xLast = -2147483648; this.m_yLast = -2147483648; int offsetX = base.OffsetX; int offsetY = base.OffsetY; int useWidth = base.UseWidth; this.m_Entries = new GServerEntry[servers.Length]; for (int i = 0; i < servers.Length; i++) { this.m_Entries[i] = new GServerEntry(servers[i], font, hue, offsetX, offsetY, useWidth, selectionBorderColor, selectionFillColor, ((float) selectionFillAlpha) / 255f); offsetY += this.m_Entries[i].Height - 1; base.m_Children.Add(this.m_Entries[i]); } offsetY++; offsetY -= base.OffsetY; if (offsetY > (base.UseHeight - 2)) { base.m_Children.Add(new GImage(0x101, this.Width - 6, 4)); base.m_Children.Add(new GImage(0xff, this.Width - 6, this.Height - 0x25)); for (int j = 0x22; (j + 0x20) < (this.Height - 5); j += 30) { base.m_Children.Add(new GImage(0x100, this.Width - 6, j)); } base.m_NonRestrictivePicking = true; this.m_Slider = new GVSlider(0xfe, this.Width - 5, 0x11, 13, 0xec, 0.0, 0.0, (double) (offsetY - (base.UseHeight - 2)), 1.0); this.m_Slider.OnValueChange = new OnValueChange(this.OnScroll); this.m_Slider.ScrollOffset = 20.0; base.m_Children.Add(this.m_Slider); base.m_Children.Add(new GHotspot(this.Width - 6, 4, 15, this.Height - 9, this.m_Slider)); } }
public GBuyGump(int serial, BuyInfo[] info) : base(0x870, 15, 15) { base.m_GUID = string.Format("GBuyGump-{0}", serial); this.m_Serial = serial; this.m_Info = info; UnicodeFont uniFont = Engine.GetUniFont(3); IHue hue = Hues.Load(0x288); Array.Sort(info); int y = 0x42; for (int i = 0; i < info.Length; i++) { bool seperate = i != (info.Length - 1); BuyInfo si = info[i]; GBuyGump_InventoryItem toAdd = new GBuyGump_InventoryItem(this, si, y, seperate); base.m_Children.Add(toAdd); si.InventoryGump = toAdd; y += toAdd.Height; if (seperate) { y += 0x10; } } if (y > 230) { GVSlider slider = new GVSlider(0x828, 0xed, 0x51, 0x22, 0x5c, 0.0, 0.0, (double)(y - 230), 1.0) { OnValueChange = new OnValueChange(this.Slider_OnValueChange) }; base.m_Children.Add(slider); base.m_Children.Add(new GHotspot(0xed, 0x42, 0x22, 0x7a, slider)); } base.m_NonRestrictivePicking = true; this.m_OfferMenu = new GBuyGump_OfferMenu(this); base.m_Children.Add(this.m_OfferMenu); base.m_X = (Engine.ScreenWidth - (this.m_OfferMenu.X + this.m_OfferMenu.Width)) / 2; base.m_Y = (Engine.ScreenHeight - (this.m_OfferMenu.Y + this.m_OfferMenu.Height)) / 2; }
public GSellGump(int serial, SellInfo[] info) : base(0x872, 15, 15) { base.m_GUID = string.Format("GSellGump-{0}", serial); this.m_Serial = serial; this.m_Info = info; UnicodeFont uniFont = Engine.GetUniFont(3); IHue hue = Hues.Load(0x288); Array.Sort(info); int y = 0x42; for (int i = 0; i < info.Length; i++) { bool seperate = i != (info.Length - 1); SellInfo si = info[i]; GSellGump_InventoryItem toAdd = new GSellGump_InventoryItem(this, si, y, seperate); base.m_Children.Add(toAdd); si.InventoryGump = toAdd; y += toAdd.Height; if (seperate) { y += 0x10; } } if (y > 230) { GVSlider slider = new GVSlider(0x828, 0xed, 0x51, 0x22, 0x5c, 0.0, 0.0, (double) (y - 230), 1.0) { OnValueChange = new OnValueChange(this.Slider_OnValueChange) }; base.m_Children.Add(slider); base.m_Children.Add(new GHotspot(0xed, 0x42, 0x22, 0x7a, slider)); } base.m_NonRestrictivePicking = true; this.m_OfferMenu = new GSellGump_OfferMenu(this); base.m_Children.Add(this.m_OfferMenu); base.m_X = (Engine.ScreenWidth - (this.m_OfferMenu.X + this.m_OfferMenu.Width)) / 2; base.m_Y = (Engine.ScreenHeight - (this.m_OfferMenu.Y + this.m_OfferMenu.Height)) / 2; }
private void ProcessHtmlGump(int thisPage, int x, int y, int width, int height, string text, bool hasBack, bool hasScroll, int color) { UnicodeFont uniFont = Engine.GetUniFont(1); if (!hasScroll) { if (hasBack) { GServerBackground toAdd = new GServerBackground(this, x, y, width, height, 0xbbc, true); GHtmlLabel label = new GHtmlLabel(text, uniFont, color, toAdd.OffsetX - 2, toAdd.OffsetY - 1, toAdd.UseWidth); label.Scissor(0, 0, label.Width, toAdd.UseHeight); toAdd.Children.Add(label); this.Pages(thisPage).Add(toAdd); } else { GHtmlLabel label2 = new GHtmlLabel(text, uniFont, color, x - 2, y - 1, width); label2.Scissor(0, 0, label2.Width, height); this.Pages(thisPage).Add(label2); } } else { GHtmlLabel label3; int num; width -= 15; if (hasBack) { GServerBackground background2 = new GServerBackground(this, x, y, width, height, 0xbbc, true); label3 = new GHtmlLabel(text, uniFont, color, background2.OffsetX - 2, background2.OffsetY - 1, background2.UseWidth); label3.Scissor(0, 0, label3.Width, num = background2.UseHeight); background2.Children.Add(label3); this.Pages(thisPage).Add(background2); } else { label3 = new GHtmlLabel(text, uniFont, color, x - 2, y - 1, width); label3.Scissor(0, 0, label3.Width, num = height); this.Pages(thisPage).Add(label3); } if ((height >= 0x1b) && (label3.Height > num)) { this.Pages(thisPage).Add(new GImage(0x101, x + width, y)); this.Pages(thisPage).Add(new GImage(0xff, x + width, (y + height) - 0x20)); for (int i = y + 30; (i + 0x20) < (y + height); i += 30) { this.Pages(thisPage).Add(new GImage(0x100, x + width, i)); } GVSlider slider = new GVSlider(0xfe, (x + width) + 1, (y + 1) + 12, 13, (height - 2) - 0x18, 0.0, 0.0, (double)(label3.Height - num), 1.0); slider.SetTag("yBase", label3.Y); slider.SetTag("toScroll", label3); slider.SetTag("viewHeight", num); slider.OnValueChange = new OnValueChange(this.OnScroll); this.Pages(thisPage).Add(slider); this.Pages(thisPage).Add(new GHotspot(x + width, y, 15, height, slider)); } else { this.Pages(thisPage).Add(new GImage(0x101, x + width, y)); this.Pages(thisPage).Add(new GImage(0xff, x + width, (y + height) - 0x20)); for (int j = y + 30; (j + 0x20) < (y + height); j += 30) { this.Pages(thisPage).Add(new GImage(0x100, x + width, j)); } this.Pages(thisPage).Add(new GImage(0xfe, Hues.Grayscale, (x + width) + 1, y + 1)); } } }
public static void ShowCharCreationSkills(int Str, int Dex, int Int, int vSkill1, int vSkill2, int vSkill3, int iSkill1, int iSkill2, int iSkill3) { GButton button2; GVSlider slider; GTextButton button3; GTextButton button4; GTextButton button5; Cursor.Hourglass = false; GBackground toAdd = new GBackground(0xa2c, 0x222, 0x160, 80, 80, true); toAdd.Children.Add(new GImage(0x58b, 0x42, -22)); toAdd.Children.Add(new GImage(0x589, 0x8e, -38)); toAdd.Children.Add(new GImage(0x1580, 0x97, -30)); toAdd.Children.Add(new GButton(0x119c, 120, 0x114, null)); GListBox box = new GListBox(GetFont(9), Hues.Load(0x76b), Hues.Load(0x961), 0xbbc, 40, 0x39, 0xcc, 0xd6, true); Client.Skills skills = Skills; for (int i = 0; i < 0x100; i++) { Skill skill = skills[i]; if (skill == null) { break; } box.AddItem(skill.Name); } box.OnClick = new OnClick(Engine.CharSkill_OnClick); toAdd.Children.Add(box); int num2 = 0x31 - box.ItemCount; if (num2 < 0) { num2 = 0; } GButton button = new GButton(250, 250, 0xfb, box.X + box.Width, box.Y, new OnClick(Engine.ScrollUp_OnClick)); toAdd.Children.Add(button); button2 = new GButton(0xfc, 0xfc, 0xfd, box.X + box.Width, box.Y + box.Height, new OnClick(Engine.ScrollDown_OnClick)) { Y = button2.Y - button2.Height }; toAdd.Children.Add(button2); toAdd.Children.Add(new GBackground(0x100, button.Width, button2.Y - (button.Y + button.Height), button.X, button.Y + button.Height, false)); slider = new GVSlider(0xfe, (box.X + box.Width) + 1, button.Y + button.Height, 13, button2.Y - (button.Y + button.Height), 0.0, 0.0, (double) num2, 1.0) { Y = slider.Y + slider.HalfHeight, Height = slider.Height - (slider.HalfHeight * 2), OnValueChange = new OnValueChange(Engine.ListView_OnValueChange) }; slider.SetTag("ListBox", box); slider.SetValue(0.0, false); toAdd.Children.Add(slider); button.SetTag("Scroller", slider); button2.SetTag("Scroller", slider); toAdd.Children.Add(new GBackground(0xbbc, 0x69, 0x19, 270, 0xba, true)); toAdd.Children.Add(new GBackground(0xbbc, 0x69, 0x19, 270, 0xd8, true)); toAdd.Children.Add(new GBackground(0xbbc, 0x69, 0x19, 270, 0xf6, true)); toAdd.Children.Add(new GLabel("Strength", GetFont(1), Hues.Load(1), 280, 0x38)); toAdd.Children.Add(new GLabel("Dexterity", GetFont(1), Hues.Load(1), 280, 0x56)); toAdd.Children.Add(new GLabel("Intelligence", GetFont(1), Hues.Load(1), 280, 0x74)); int[] numArray = new int[] { 0x39, 0x57, 0x75, 0xc1, 0xdf, 0xfd }; int[] numArray2 = new int[] { Str, Dex, Int, vSkill1, vSkill2, vSkill3 }; double[] numArray3 = new double[] { 10.0, 10.0, 10.0, 0.0, 0.0, 0.0 }; double[] numArray4 = new double[] { 60.0, 60.0, 60.0, 50.0, 50.0, 50.0 }; double[] numArray5 = new double[] { 80.0, 80.0, 80.0, 100.0, 100.0, 100.0 }; GSlider[] sliderArray = new GSlider[6]; GLabel[] labelArray = new GLabel[6]; for (int j = 0; j < 6; j++) { toAdd.Children.Add(new GImage(0xd5, 420, numArray[j])); toAdd.Children.Add(new GBackground(0xd6, 0x4b, 14, 0x1b1, numArray[j], false)); toAdd.Children.Add(new GImage(0xd7, 0x1fc, numArray[j])); GLabel label = new GLabel(numArray2[j].ToString(), GetFont(1), Hues.Load(1), 380, numArray[j] - 1); GSlider slider2 = new GSlider(0xd8, 0x1a8, numArray[j], 0x5d, 14, (double) numArray2[j], numArray3[j], numArray4[j], 1.0) { OnValueChange = new OnValueChange(Engine.UpdateStaticSlider_OnValueChange) }; slider2.SetTag("Static", label); slider2.SetTag("Font", GetFont(1)); slider2.SetTag("Hue", Hues.Load(1)); slider2.SetTag("Max", numArray5[j]); sliderArray[j] = slider2; labelArray[j] = label; toAdd.Children.Add(label); toAdd.Children.Add(slider2); } for (int k = 0; k < 3; k++) { string name = string.Format("Slider{0}", k + 1); sliderArray[0].SetTag(name, sliderArray[k]); sliderArray[1].SetTag(name, sliderArray[k]); sliderArray[2].SetTag(name, sliderArray[k]); sliderArray[3].SetTag(name, sliderArray[k + 3]); sliderArray[4].SetTag(name, sliderArray[k + 3]); sliderArray[5].SetTag(name, sliderArray[k + 3]); } OnClick onClick = new OnClick(Engine.CharSkillBox_OnClick); button3 = new GTextButton((iSkill1 == -1) ? "Click Here" : Skills[iSkill1].Name, GetFont(9), Hues.Load(0x76b), Hues.Load(0x961), 0x113, 0xbf, onClick) { X = 0x112, Y = 0xd1 - button3.Height }; button3.SetTag("List", box); button3.SetTag("Skill", iSkill1); toAdd.Children.Add(button3); button4 = new GTextButton((iSkill2 == -1) ? "Click Here" : Skills[iSkill2].Name, GetFont(9), Hues.Load(0x76b), Hues.Load(0x961), 0x113, 0xbf, onClick) { X = 0x112, Y = 0xef - button4.Height }; button4.SetTag("List", box); button4.SetTag("Skill", iSkill2); toAdd.Children.Add(button4); button5 = new GTextButton((iSkill3 == -1) ? "Click Here" : Skills[iSkill3].Name, GetFont(9), Hues.Load(0x76b), Hues.Load(0x961), 0x113, 0xbf, onClick) { X = 0x112, Y = 0x10d - button5.Height }; button5.SetTag("List", box); button5.SetTag("Skill", iSkill3); toAdd.Children.Add(button5); toAdd.Children.Add(new GHotspot(270, 0xba, 0x69, 0x19, button3)); toAdd.Children.Add(new GHotspot(270, 0xd8, 0x69, 0x19, button4)); toAdd.Children.Add(new GHotspot(270, 0xf6, 0x69, 0x19, button5)); Gumps.Desktop.Children.Clear(); Gumps.Desktop.Children.Add(new GBackground(0x588, ScreenWidth, ScreenHeight, false)); Gumps.Desktop.Children.Add(new GImage(0x157c, 0, 0)); Gumps.Desktop.Children.Add(new GImage(0x15a0, 0, 4)); GButton button6 = new GButton(0x1589, 0x22b, 4, new OnClick(Engine.Quit_OnClick)) { Tooltip = new Tooltip(Strings.GetString("Tooltips.Quit")) }; Gumps.Desktop.Children.Add(button6); GButton button7 = new GButton(0x15a4, 610, 0x1bd, new OnClick(Engine.CharCreationSkillsArrow_OnClick)); button7.SetTag("Strength", labelArray[0]); button7.SetTag("Dexterity", labelArray[1]); button7.SetTag("Intelligence", labelArray[2]); button7.SetTag("vSkill1", labelArray[3]); button7.SetTag("vSkill2", labelArray[4]); button7.SetTag("vSkill3", labelArray[5]); button7.SetTag("iSkill1", button3); button7.SetTag("iSkill2", button4); button7.SetTag("iSkill3", button5); Gumps.Desktop.Children.Add(button7); Gumps.Desktop.Children.Add(toAdd); }
private void ProcessHtmlGump(int thisPage, int x, int y, int width, int height, string text, bool hasBack, bool hasScroll, int color) { UnicodeFont uniFont = Engine.GetUniFont(1); if (!hasScroll) { if (hasBack) { GServerBackground toAdd = new GServerBackground(this, x, y, width, height, 0xbbc, true); GHtmlLabel label = new GHtmlLabel(text, uniFont, color, toAdd.OffsetX - 2, toAdd.OffsetY - 1, toAdd.UseWidth); label.Scissor(0, 0, label.Width, toAdd.UseHeight); toAdd.Children.Add(label); this.Pages(thisPage).Add(toAdd); } else { GHtmlLabel label2 = new GHtmlLabel(text, uniFont, color, x - 2, y - 1, width); label2.Scissor(0, 0, label2.Width, height); this.Pages(thisPage).Add(label2); } } else { GHtmlLabel label3; int num; width -= 15; if (hasBack) { GServerBackground background2 = new GServerBackground(this, x, y, width, height, 0xbbc, true); label3 = new GHtmlLabel(text, uniFont, color, background2.OffsetX - 2, background2.OffsetY - 1, background2.UseWidth); label3.Scissor(0, 0, label3.Width, num = background2.UseHeight); background2.Children.Add(label3); this.Pages(thisPage).Add(background2); } else { label3 = new GHtmlLabel(text, uniFont, color, x - 2, y - 1, width); label3.Scissor(0, 0, label3.Width, num = height); this.Pages(thisPage).Add(label3); } if ((height >= 0x1b) && (label3.Height > num)) { this.Pages(thisPage).Add(new GImage(0x101, x + width, y)); this.Pages(thisPage).Add(new GImage(0xff, x + width, (y + height) - 0x20)); for (int i = y + 30; (i + 0x20) < (y + height); i += 30) { this.Pages(thisPage).Add(new GImage(0x100, x + width, i)); } GVSlider slider = new GVSlider(0xfe, (x + width) + 1, (y + 1) + 12, 13, (height - 2) - 0x18, 0.0, 0.0, (double) (label3.Height - num), 1.0); slider.SetTag("yBase", label3.Y); slider.SetTag("toScroll", label3); slider.SetTag("viewHeight", num); slider.OnValueChange = new OnValueChange(this.OnScroll); this.Pages(thisPage).Add(slider); this.Pages(thisPage).Add(new GHotspot(x + width, y, 15, height, slider)); } else { this.Pages(thisPage).Add(new GImage(0x101, x + width, y)); this.Pages(thisPage).Add(new GImage(0xff, x + width, (y + height) - 0x20)); for (int j = y + 30; (j + 0x20) < (y + height); j += 30) { this.Pages(thisPage).Add(new GImage(0x100, x + width, j)); } this.Pages(thisPage).Add(new GImage(0xfe, Hues.Grayscale, (x + width) + 1, y + 1)); } } }
public GQuestionMenu(int serial, int menuID, string question, AnswerEntry[] answers) : base(0x23f4, Engine.ScreenWidth / 2, 100, 50, 50, true) { base.m_CanDrag = true; base.m_QuickDrag = true; this.m_Serial = serial; this.m_MenuID = menuID; GWrappedLabel toAdd = new GWrappedLabel(question, Engine.GetFont(1), Hues.Load(0x455), base.OffsetX + 4, base.OffsetY + 4, base.UseWidth - 8); base.m_Children.Add(toAdd); this.m_Entries = new GQuestionMenuEntry[answers.Length]; GBackground background = new GQuestionBackground(this.m_Entries, base.UseWidth - 8, ((base.UseHeight - 8) - toAdd.Height) - 4, base.OffsetX + 4, (toAdd.Y + toAdd.Height) + 4); background.SetMouseOverride(this); int offsetX = background.OffsetX; int offsetY = background.OffsetY; int useWidth = background.UseWidth; for (int i = 0; i < answers.Length; i++) { GQuestionMenuEntry entry = new GQuestionMenuEntry(offsetX, offsetY, useWidth, answers[i]); background.Children.Add(entry); entry.Radio.ParentOverride = background; this.m_Entries[i] = entry; offsetY += entry.Height + 4; } background.Height = ((offsetY - 4) - background.OffsetY) + (background.Height - background.UseHeight); this.Height = (((((this.Height - base.UseHeight) + 4) + toAdd.Height) + 4) + background.Height) + 4; int num5 = (int)(Engine.ScreenHeight * 0.75); if (this.Height > num5) { this.Height = num5; background.Height = ((base.UseHeight - 8) - toAdd.Height) - 4; } offsetY -= 4; offsetY -= background.OffsetY; if (offsetY > background.UseHeight) { int num6 = offsetY; background.Width += 0x13; this.Width += 0x13; offsetX = (background.OffsetX + background.UseWidth) - 15; offsetY = background.OffsetY; background.Children.Add(new GImage(0x101, offsetX, offsetY)); background.Children.Add(new GImage(0xff, offsetX, (offsetY + background.UseHeight) - 0x20)); for (int j = offsetY + 30; (j + 0x20) < background.UseHeight; j += 30) { background.Children.Add(new GImage(0x100, offsetX, j)); } this.m_Slider = new GVSlider(0xfe, offsetX + 1, (offsetY + 1) + 12, 13, (background.UseHeight - 2) - 0x18, 0.0, 0.0, (double)(num6 - background.UseHeight), 1.0); this.m_Slider.OnValueChange = new OnValueChange(this.OnScroll); this.m_Slider.ScrollOffset = 20.0; background.Children.Add(this.m_Slider); background.Children.Add(new GHotspot(offsetX, offsetY, 15, background.UseHeight, this.m_Slider)); } GButtonNew new2 = new GButtonNew(0xf3, 0xf2, 0xf1, 0, (background.Y + background.Height) + 4); GButtonNew new3 = new GButtonNew(0xf9, 0xf7, 0xf8, 0, new2.Y); new2.Clicked += new EventHandler(this.Cancel_Clicked); new3.Clicked += new EventHandler(this.Okay_Clicked); new2.X = ((base.OffsetX + base.UseWidth) - 4) - new2.Width; new3.X = (new2.X - 4) - new3.Width; base.m_Children.Add(new2); base.m_Children.Add(new3); this.Height += 4 + new2.Height; base.m_Children.Add(background); this.Center(); }
public GQuestionMenu(int serial, int menuID, string question, AnswerEntry[] answers) : base(0x23f4, Engine.ScreenWidth / 2, 100, 50, 50, true) { base.m_CanDrag = true; base.m_QuickDrag = true; this.m_Serial = serial; this.m_MenuID = menuID; GWrappedLabel toAdd = new GWrappedLabel(question, Engine.GetFont(1), Hues.Load(0x455), base.OffsetX + 4, base.OffsetY + 4, base.UseWidth - 8); base.m_Children.Add(toAdd); this.m_Entries = new GQuestionMenuEntry[answers.Length]; GBackground background = new GQuestionBackground(this.m_Entries, base.UseWidth - 8, ((base.UseHeight - 8) - toAdd.Height) - 4, base.OffsetX + 4, (toAdd.Y + toAdd.Height) + 4); background.SetMouseOverride(this); int offsetX = background.OffsetX; int offsetY = background.OffsetY; int useWidth = background.UseWidth; for (int i = 0; i < answers.Length; i++) { GQuestionMenuEntry entry = new GQuestionMenuEntry(offsetX, offsetY, useWidth, answers[i]); background.Children.Add(entry); entry.Radio.ParentOverride = background; this.m_Entries[i] = entry; offsetY += entry.Height + 4; } background.Height = ((offsetY - 4) - background.OffsetY) + (background.Height - background.UseHeight); this.Height = (((((this.Height - base.UseHeight) + 4) + toAdd.Height) + 4) + background.Height) + 4; int num5 = (int) (Engine.ScreenHeight * 0.75); if (this.Height > num5) { this.Height = num5; background.Height = ((base.UseHeight - 8) - toAdd.Height) - 4; } offsetY -= 4; offsetY -= background.OffsetY; if (offsetY > background.UseHeight) { int num6 = offsetY; background.Width += 0x13; this.Width += 0x13; offsetX = (background.OffsetX + background.UseWidth) - 15; offsetY = background.OffsetY; background.Children.Add(new GImage(0x101, offsetX, offsetY)); background.Children.Add(new GImage(0xff, offsetX, (offsetY + background.UseHeight) - 0x20)); for (int j = offsetY + 30; (j + 0x20) < background.UseHeight; j += 30) { background.Children.Add(new GImage(0x100, offsetX, j)); } this.m_Slider = new GVSlider(0xfe, offsetX + 1, (offsetY + 1) + 12, 13, (background.UseHeight - 2) - 0x18, 0.0, 0.0, (double) (num6 - background.UseHeight), 1.0); this.m_Slider.OnValueChange = new OnValueChange(this.OnScroll); this.m_Slider.ScrollOffset = 20.0; background.Children.Add(this.m_Slider); background.Children.Add(new GHotspot(offsetX, offsetY, 15, background.UseHeight, this.m_Slider)); } GButtonNew new2 = new GButtonNew(0xf3, 0xf2, 0xf1, 0, (background.Y + background.Height) + 4); GButtonNew new3 = new GButtonNew(0xf9, 0xf7, 0xf8, 0, new2.Y); new2.Clicked += new EventHandler(this.Cancel_Clicked); new3.Clicked += new EventHandler(this.Okay_Clicked); new2.X = ((base.OffsetX + base.UseWidth) - 4) - new2.Width; new3.X = (new2.X - 4) - new3.Width; base.m_Children.Add(new2); base.m_Children.Add(new3); this.Height += 4 + new2.Height; base.m_Children.Add(background); this.Center(); }