Exemplo n.º 1
0
        public GSellGump_InventoryItem(GSellGump owner, SellInfo si, int y, bool seperate)
            : base(32, y, 195, 0)
        {
            this.m_Owner = owner;
            this.m_yBase = y;
            this.m_Info  = si;
            IFont font = (IFont)Engine.GetUniFont(3);
            IHue  hue  = Hues.Load(648);

            this.m_Image       = new GItemArt(0, 0, si.ItemID, si.Hue);
            this.m_Description = (GLabel) new GWrappedLabel(string.Format("{0} at {1} gp", (object)si.Name, (object)si.Price), font, hue, 58, 0, 105);
            this.m_Available   = new GLabel(si.Amount.ToString(), font, hue, 195, 0);
            this.m_Height      = this.m_Image.Image.yMax - this.m_Image.Image.yMin + 1;
            int num1 = this.m_Description.Image.yMax - this.m_Description.Image.yMin + 1;

            if (num1 > this.m_Height)
            {
                this.m_Height = num1;
            }
            int num2 = this.m_Available.Image.yMax - this.m_Available.Image.yMin + 1;

            if (num2 > this.m_Height)
            {
                this.m_Height = num2;
            }
            this.m_Image.X       += (56 - (this.m_Image.Image.xMax - this.m_Image.Image.xMin + 1)) / 2;
            this.m_Image.Y       += (this.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 += (this.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   += (this.m_Height - (this.m_Available.Image.yMax - this.m_Available.Image.yMin + 1)) / 2;
            this.m_Available.Y   -= this.m_Available.Image.yMin;
            this.m_Children.Add((Gump)this.m_Image);
            this.m_Children.Add((Gump)this.m_Description);
            this.m_Children.Add((Gump)this.m_Available);
            this.m_xAvailable = si.Amount;
            if (seperate)
            {
                this.m_Separator = new GImage[11];
                this.m_Children.Add((Gump)(this.m_Separator[0] = new GImage(57, 0, this.m_Height)));
                for (int index = 0; index < 9; ++index)
                {
                    this.m_Children.Add((Gump)(this.m_Separator[index + 1] = new GImage(58, 30 + index * 16, this.m_Height)));
                }
                this.m_Children.Add((Gump)(this.m_Separator[10] = new GImage(59, 165, this.m_Height)));
            }
            else
            {
                this.m_Separator = new GImage[0];
            }
            if (!Engine.ServerFeatures.AOS)
            {
                return;
            }
            this.Tooltip = (ITooltip) new ItemTooltip(si.Item);
        }
Exemplo n.º 2
0
 public GItemCounter(ItemIDValidator v)
     : base(0, 0, 100, 20)
 {
     this.m_Validator = (IItemValidator)v;
     this.m_Image     = new GItemArt(3, 3, v.List[0]);
     this.m_Label     = new GLabel("", Engine.DefaultFont, Hues.Bright, 0, 0);
     this.m_Image.X  -= this.m_Image.Image.xMin;
     this.m_Image.Y  -= this.m_Image.Image.yMin;
     this.m_Children.Add((Gump)this.m_Image);
     this.m_Children.Add((Gump)this.m_Label);
     this.m_LastAmount = int.MinValue;
 }