Exemplo n.º 1
0
        public GItemListEntry(int x, AnswerEntry entry, GItemList owner)
            : base(x, 45)
        {
            this.m_Entry = entry;
            this.m_Owner = owner;
            int hue = entry.Hue;

            if (hue > 0)
            {
                ++hue;
            }
            this.m_Hue   = Hues.GetItemHue(entry.ItemID, hue);
            this.m_Image = this.m_Hue.GetItem(entry.ItemID);
            if (this.m_Image == null || this.m_Image.IsEmpty())
            {
                return;
            }
            this.m_Draw   = true;
            this.m_Height = 47;
            int num = this.m_Image.xMax - this.m_Image.xMin + 1;

            this.m_Width = 47;
            if (num > this.m_Width)
            {
                this.m_Width = num;
            }
            this.m_ImageOffsetX = (this.m_Width - (this.m_Image.xMax - this.m_Image.xMin + 1)) / 2 - this.m_Image.xMin;
            this.m_ImageOffsetY = (this.m_Height - (this.m_Image.yMax - this.m_Image.yMin + 1)) / 2 - this.m_Image.yMin;
        }
Exemplo n.º 2
0
 public GItemListScroller(int x, GItemList owner, int offset)
     : base(x, 59, 12, 19, (OnClick)null)
 {
     this.m_Owner  = owner;
     this.m_Offset = offset;
     this.m_Last   = -1234.56;
 }