Пример #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;
        }
Пример #2
0
 private void Okay_Clicked(object sender, EventArgs e)
 {
     for (int index = 0; index < this.m_Entries.Length; ++index)
     {
         if (this.m_Entries[index].Radio.State)
         {
             AnswerEntry answer = this.m_Entries[index].Answer;
             Network.Send((Packet) new PQuestionMenuResponse(this.m_Serial, this.m_MenuID, answer.Index, answer.ItemID, 0));
             Gumps.Destroy((Gump)this);
             break;
         }
     }
 }