Пример #1
0
 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));
 }
Пример #2
0
 public GBuyGump_InventoryItem(GBuyGump owner, BuyInfo si, int y, bool seperate)
     : base(0x20, y, 0xc3, 0)
 {
     this.m_Owner = owner;
     this.m_yBase = y;
     this.m_Info = si;
     IFont uniFont = Engine.GetUniFont(3);
     IHue hue = Hues.Load(0x288);
     this.m_Image = new GItemArt(0, 0, si.ItemID, si.Hue);
     this.m_Description = new GWrappedLabel(string.Format("{0} at {1} gp", si.Name, si.Price), uniFont, hue, 0x3a, 0, 0x69);
     this.m_Available = new GLabel(si.Amount.ToString(), uniFont, hue, 0xc3, 0);
     int num = (this.m_Image.Image.yMax - this.m_Image.Image.yMin) + 1;
     base.m_Height = num;
     num = (this.m_Description.Image.yMax - this.m_Description.Image.yMin) + 1;
     if (num > base.m_Height)
     {
         base.m_Height = num;
     }
     num = (this.m_Available.Image.yMax - this.m_Available.Image.yMin) + 1;
     if (num > base.m_Height)
     {
         base.m_Height = num;
     }
     this.m_Image.X += (0x38 - ((this.m_Image.Image.xMax - this.m_Image.Image.xMin) + 1)) / 2;
     this.m_Image.Y += (base.m_Height - ((this.m_Image.Image.yMax - this.m_Image.Image.yMin) + 1)) / 2;
     this.m_Image.X -= this.m_Image.Image.xMin;
     this.m_Image.Y -= this.m_Image.Image.yMin;
     this.m_Description.X -= this.m_Description.Image.xMin;
     this.m_Description.Y += (base.m_Height - ((this.m_Description.Image.yMax - this.m_Description.Image.yMin) + 1)) / 2;
     this.m_Description.Y -= this.m_Description.Image.yMin;
     this.m_Available.X -= this.m_Available.Image.xMax + 1;
     this.m_Available.Y += (base.m_Height - ((this.m_Available.Image.yMax - this.m_Available.Image.yMin) + 1)) / 2;
     this.m_Available.Y -= this.m_Available.Image.yMin;
     base.m_Children.Add(this.m_Image);
     base.m_Children.Add(this.m_Description);
     base.m_Children.Add(this.m_Available);
     this.m_xAvailable = si.Amount;
     if (seperate)
     {
         GImage image;
         this.m_Separator = new GImage[11];
         this.m_Separator[0] = image = new GImage(0x39, 0, base.m_Height);
         base.m_Children.Add(image);
         for (int i = 0; i < 9; i++)
         {
             this.m_Separator[i + 1] = image = new GImage(0x3a, 30 + (i * 0x10), base.m_Height);
             base.m_Children.Add(image);
         }
         this.m_Separator[10] = image = new GImage(0x3b, 0xa5, base.m_Height);
         base.m_Children.Add(image);
     }
     else
     {
         this.m_Separator = new GImage[0];
     }
     if (Engine.Features.AOS)
     {
         base.Tooltip = new ItemTooltip(si.Item);
     }
 }
Пример #3
0
        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));
        }
Пример #4
0
 public GBuyGump_AmountButton(GBuyGump owner, BuyInfo info, int offset, int gumpID, int x) : base(gumpID, x, 0)
 {
     this.m_Owner         = owner;
     this.m_Info          = info;
     this.m_InitialOffset = offset;
     this.m_Offset        = offset;
     this.m_Last          = -1234.56;
 }
Пример #5
0
 public GBuyGump_AmountButton(GBuyGump owner, BuyInfo info, int offset, int gumpID, int x)
     : base(gumpID, x, 0)
 {
     this.m_Owner = owner;
     this.m_Info = info;
     this.m_InitialOffset = offset;
     this.m_Offset = offset;
     this.m_Last = -1234.56;
 }
Пример #6
0
        public GBuyGump_OfferedItem(GBuyGump owner, BuyInfo bi) : base(0x20, 0x43, 0xc4, 0)
        {
            this.m_OfferMenu = owner.OfferMenu;
            IFont uniFont = Engine.GetUniFont(3);
            IHue  hue     = Hues.Load(0x288);

            this.m_xAmount     = bi.ToBuy;
            this.m_Amount      = new GLabel(bi.ToBuy.ToString(), uniFont, hue, 0, 0);
            this.m_Description = new GWrappedLabel(string.Format("{0} at {1} gp", bi.Name, bi.Price), uniFont, hue, 0x29, 0, 0x69);
            this.m_More        = new GBuyGump_AmountButton(owner, bi, 5, 0x37, 0x9b);
            this.m_Less        = new GBuyGump_AmountButton(owner, bi, -5, 0x38, 0xad);
            int height = (this.m_Amount.Image.yMax - this.m_Amount.Image.yMin) + 1;

            base.m_Height = height;
            height        = (this.m_Description.Image.yMax - this.m_Description.Image.yMin) + 1;
            if (height > base.m_Height)
            {
                base.m_Height = height;
            }
            height = this.m_More.Height;
            if (height > base.m_Height)
            {
                base.m_Height = height;
            }
            height = this.m_Less.Height;
            if (height > base.m_Height)
            {
                base.m_Height = height;
            }
            this.m_Amount.X      -= this.m_Amount.Image.xMin;
            this.m_Amount.Y       = (base.m_Height - ((this.m_Amount.Image.yMax - this.m_Amount.Image.yMin) + 1)) / 2;
            this.m_Description.X -= this.m_Description.Image.xMin;
            this.m_Description.Y  = (base.m_Height - ((this.m_Description.Image.yMax - this.m_Description.Image.yMin) + 1)) / 2;
            if (this.m_Amount.Y > this.m_Description.Y)
            {
                this.m_Amount.Y = this.m_Description.Y;
            }
            this.m_Amount.Y      -= this.m_Amount.Image.yMin;
            this.m_Description.Y -= this.m_Description.Image.yMin;
            this.m_More.Y         = (base.m_Height - this.m_More.Height) / 2;
            this.m_Less.Y         = (base.m_Height - this.m_Less.Height) / 2;
            base.m_Children.Add(this.m_Amount);
            base.m_Children.Add(this.m_Description);
            base.m_Children.Add(this.m_More);
            base.m_Children.Add(this.m_Less);
            this.Clipper = this.m_OfferMenu.ContentClipper;
            if (Engine.Features.AOS)
            {
                base.Tooltip = new ItemTooltip(bi.Item);
            }
        }
Пример #7
0
 public GBuyGump_OfferedItem(GBuyGump owner, BuyInfo bi)
     : base(0x20, 0x43, 0xc4, 0)
 {
     this.m_OfferMenu = owner.OfferMenu;
     IFont uniFont = Engine.GetUniFont(3);
     IHue hue = Hues.Load(0x288);
     this.m_xAmount = bi.ToBuy;
     this.m_Amount = new GLabel(bi.ToBuy.ToString(), uniFont, hue, 0, 0);
     this.m_Description = new GWrappedLabel(string.Format("{0} at {1} gp", bi.Name, bi.Price), uniFont, hue, 0x29, 0, 0x69);
     this.m_More = new GBuyGump_AmountButton(owner, bi, 5, 0x37, 0x9b);
     this.m_Less = new GBuyGump_AmountButton(owner, bi, -5, 0x38, 0xad);
     int height = (this.m_Amount.Image.yMax - this.m_Amount.Image.yMin) + 1;
     base.m_Height = height;
     height = (this.m_Description.Image.yMax - this.m_Description.Image.yMin) + 1;
     if (height > base.m_Height)
     {
         base.m_Height = height;
     }
     height = this.m_More.Height;
     if (height > base.m_Height)
     {
         base.m_Height = height;
     }
     height = this.m_Less.Height;
     if (height > base.m_Height)
     {
         base.m_Height = height;
     }
     this.m_Amount.X -= this.m_Amount.Image.xMin;
     this.m_Amount.Y = (base.m_Height - ((this.m_Amount.Image.yMax - this.m_Amount.Image.yMin) + 1)) / 2;
     this.m_Description.X -= this.m_Description.Image.xMin;
     this.m_Description.Y = (base.m_Height - ((this.m_Description.Image.yMax - this.m_Description.Image.yMin) + 1)) / 2;
     if (this.m_Amount.Y > this.m_Description.Y)
     {
         this.m_Amount.Y = this.m_Description.Y;
     }
     this.m_Amount.Y -= this.m_Amount.Image.yMin;
     this.m_Description.Y -= this.m_Description.Image.yMin;
     this.m_More.Y = (base.m_Height - this.m_More.Height) / 2;
     this.m_Less.Y = (base.m_Height - this.m_Less.Height) / 2;
     base.m_Children.Add(this.m_Amount);
     base.m_Children.Add(this.m_Description);
     base.m_Children.Add(this.m_More);
     base.m_Children.Add(this.m_Less);
     this.Clipper = this.m_OfferMenu.ContentClipper;
     if (Engine.Features.AOS)
     {
         base.Tooltip = new ItemTooltip(bi.Item);
     }
 }
Пример #8
0
 public GBuyClear(GBuyGump owner)
     : base(0xa9, 0xc7, 0x37, 0x23)
 {
     this.m_Owner = owner;
 }
Пример #9
0
 public GBuyClear(GBuyGump owner) : base(0xa9, 0xc7, 0x37, 0x23)
 {
     this.m_Owner = owner;
 }
Пример #10
0
        public GBuyGump_InventoryItem(GBuyGump owner, BuyInfo si, int y, bool seperate) : base(0x20, y, 0xc3, 0)
        {
            this.m_Owner = owner;
            this.m_yBase = y;
            this.m_Info  = si;
            IFont uniFont = Engine.GetUniFont(3);
            IHue  hue     = Hues.Load(0x288);

            this.m_Image       = new GItemArt(0, 0, si.ItemID, si.Hue);
            this.m_Description = new GWrappedLabel(string.Format("{0} at {1} gp", si.Name, si.Price), uniFont, hue, 0x3a, 0, 0x69);
            this.m_Available   = new GLabel(si.Amount.ToString(), uniFont, hue, 0xc3, 0);
            int num = (this.m_Image.Image.yMax - this.m_Image.Image.yMin) + 1;

            base.m_Height = num;
            num           = (this.m_Description.Image.yMax - this.m_Description.Image.yMin) + 1;
            if (num > base.m_Height)
            {
                base.m_Height = num;
            }
            num = (this.m_Available.Image.yMax - this.m_Available.Image.yMin) + 1;
            if (num > base.m_Height)
            {
                base.m_Height = num;
            }
            this.m_Image.X       += (0x38 - ((this.m_Image.Image.xMax - this.m_Image.Image.xMin) + 1)) / 2;
            this.m_Image.Y       += (base.m_Height - ((this.m_Image.Image.yMax - this.m_Image.Image.yMin) + 1)) / 2;
            this.m_Image.X       -= this.m_Image.Image.xMin;
            this.m_Image.Y       -= this.m_Image.Image.yMin;
            this.m_Description.X -= this.m_Description.Image.xMin;
            this.m_Description.Y += (base.m_Height - ((this.m_Description.Image.yMax - this.m_Description.Image.yMin) + 1)) / 2;
            this.m_Description.Y -= this.m_Description.Image.yMin;
            this.m_Available.X   -= this.m_Available.Image.xMax + 1;
            this.m_Available.Y   += (base.m_Height - ((this.m_Available.Image.yMax - this.m_Available.Image.yMin) + 1)) / 2;
            this.m_Available.Y   -= this.m_Available.Image.yMin;
            base.m_Children.Add(this.m_Image);
            base.m_Children.Add(this.m_Description);
            base.m_Children.Add(this.m_Available);
            this.m_xAvailable = si.Amount;
            if (seperate)
            {
                GImage image;
                this.m_Separator    = new GImage[11];
                this.m_Separator[0] = image = new GImage(0x39, 0, base.m_Height);
                base.m_Children.Add(image);
                for (int i = 0; i < 9; i++)
                {
                    this.m_Separator[i + 1] = image = new GImage(0x3a, 30 + (i * 0x10), base.m_Height);
                    base.m_Children.Add(image);
                }
                this.m_Separator[10] = image = new GImage(0x3b, 0xa5, base.m_Height);
                base.m_Children.Add(image);
            }
            else
            {
                this.m_Separator = new GImage[0];
            }
            if (Engine.Features.AOS)
            {
                base.Tooltip = new ItemTooltip(si.Item);
            }
        }
Пример #11
0
 public GBuyAccept(GBuyGump owner)
     : base(30, 0xc1, 0x3f, 0x2a)
 {
     this.m_Owner = owner;
 }
Пример #12
0
 public GBuyAccept(GBuyGump owner) : base(30, 0xc1, 0x3f, 0x2a)
 {
     this.m_Owner = owner;
 }