Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 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;
 }