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; }
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; }