コード例 #1
0
ファイル: GEditorPanel.cs プロジェクト: uotools/PlayUO
        public void Layout()
        {
            int num   = 5;
            int num2  = 0;
            int width = 0;
            int num4  = 0;

            if (this.m_Scroller != null)
            {
                num2 = -this.m_Scroller.Value;
            }
            for (int i = 0; i < this.m_Panels.Length; i++)
            {
                GCategoryPanel toAdd = this.m_Panels[i];
                toAdd.X = 5;
                toAdd.Y = num + num2;
                if (this.m_Scroller == null)
                {
                    base.m_Children.Add(toAdd);
                }
                if (toAdd.Width > width)
                {
                    width = toAdd.Width;
                }
                if ((num + toAdd.Height) > num4)
                {
                    num4 = num + toAdd.Height;
                }
                num += toAdd.Height - 1;
            }
            width     += 0x1a;
            this.Width = width;
            if (this.m_Scroller == null)
            {
                this.m_Scroller         = new GEditorScroller(this);
                this.m_Scroller.X       = width - 0x10;
                this.m_Scroller.Y       = 0;
                this.m_Scroller.Height  = this.Height;
                this.m_Scroller.Width   = 0x10;
                this.m_Scroller.Maximum = (num4 - this.Height) + 5;
                base.m_Children.Insert(0, this.m_Scroller);
            }
        }
コード例 #2
0
ファイル: GEditorPanel.cs プロジェクト: Skinny1001/PlayUO
 public void Layout()
 {
     int num = 5;
     int num2 = 0;
     int width = 0;
     int num4 = 0;
     if (this.m_Scroller != null)
     {
         num2 = -this.m_Scroller.Value;
     }
     for (int i = 0; i < this.m_Panels.Length; i++)
     {
         GCategoryPanel toAdd = this.m_Panels[i];
         toAdd.X = 5;
         toAdd.Y = num + num2;
         if (this.m_Scroller == null)
         {
             base.m_Children.Add(toAdd);
         }
         if (toAdd.Width > width)
         {
             width = toAdd.Width;
         }
         if ((num + toAdd.Height) > num4)
         {
             num4 = num + toAdd.Height;
         }
         num += toAdd.Height - 1;
     }
     width += 0x1a;
     this.Width = width;
     if (this.m_Scroller == null)
     {
         this.m_Scroller = new GEditorScroller(this);
         this.m_Scroller.X = width - 0x10;
         this.m_Scroller.Y = 0;
         this.m_Scroller.Height = this.Height;
         this.m_Scroller.Width = 0x10;
         this.m_Scroller.Maximum = (num4 - this.Height) + 5;
         base.m_Children.Insert(0, this.m_Scroller);
     }
 }