コード例 #1
0
ファイル: MainView.cs プロジェクト: lsx6244413/UnityDecomplie
 protected override void SetPosition(Rect newPos)
 {
     base.SetPosition(newPos);
     if (base.children.Length != 0)
     {
         Toolbar toolbar = (Toolbar)base.children[0];
         base.children[0].position = new Rect(0f, 0f, newPos.width, toolbar.CalcHeight());
         if (base.children.Length > 2)
         {
             base.children[1].position = new Rect(0f, toolbar.CalcHeight(), newPos.width, newPos.height - toolbar.CalcHeight() - base.children[2].position.height);
             base.children[2].position = new Rect(0f, newPos.height - base.children[2].position.height, newPos.width, base.children[2].position.height);
         }
     }
 }
コード例 #2
0
        protected override void SetPosition(Rect newPos)
        {
            base.SetPosition(newPos);
            if (children.Length == 0)
            {
                return;
            }
            Toolbar t = (Toolbar)children[0];

            children[0].position = new Rect(0, 0, newPos.width, t.CalcHeight());
            if (children.Length > 2)
            {
                children[1].position = new Rect(0, t.CalcHeight(), newPos.width, newPos.height - t.CalcHeight() - children[2].position.height);
                children[2].position = new Rect(0, newPos.height - children[2].position.height, newPos.width, children[2].position.height);
            }
        }
コード例 #3
0
        protected override void SetPosition(Rect newPos)
        {
            base.SetPosition(newPos);
            if (this.children.Length == 0)
            {
                return;
            }
            Toolbar child = (Toolbar)this.children[0];

            this.children[0].position = new Rect(0.0f, 0.0f, newPos.width, child.CalcHeight());
            if (this.children.Length <= 2)
            {
                return;
            }
            this.children[1].position = new Rect(0.0f, child.CalcHeight(), newPos.width, newPos.height - child.CalcHeight() - this.children[2].position.height);
            this.children[2].position = new Rect(0.0f, newPos.height - this.children[2].position.height, newPos.width, this.children[2].position.height);
        }
コード例 #4
0
ファイル: MainView.cs プロジェクト: lsx6244413/UnityDecomplie
 public void Cleanup()
 {
     if (base.children[1].children.Length == 0)
     {
         Rect    position = base.window.position;
         Toolbar toolbar  = (Toolbar)base.children[0];
         position.height = toolbar.CalcHeight() + 20f;
     }
 }
コード例 #5
0
 protected override void ChildrenMinMaxChanged()
 {
     if (base.children.Length == 3)
     {
         Toolbar toolbar = (Toolbar)base.children[0];
         base.SetMinMaxSizes(new Vector2(770f, (toolbar.CalcHeight() + 20f) + base.children[1].minSize.y), new Vector2(10000f, 10000f));
     }
     base.ChildrenMinMaxChanged();
 }
コード例 #6
0
 protected override void ChildrenMinMaxChanged()
 {
     if (children.Length == 3)
     {
         Toolbar t   = (Toolbar)children[0];
         var     min = new Vector2(kMinSize.x, Mathf.Max(kMinSize.y, t.CalcHeight() + kStatusbarHeight + children[1].minSize.y));
         SetMinMaxSizes(min, kMaxSize);
     }
     base.ChildrenMinMaxChanged();
 }
コード例 #7
0
ファイル: MainView.cs プロジェクト: twenty0ne/UnityDecompiled
 protected override void ChildrenMinMaxChanged()
 {
     if (base.children.Length == 3)
     {
         Toolbar toolbar = (Toolbar)base.children[0];
         Vector2 min     = new Vector2(kMinSize.x, Mathf.Max(kMinSize.y, (toolbar.CalcHeight() + 20f) + base.children[1].minSize.y));
         base.SetMinMaxSizes(min, kMaxSize);
     }
     base.ChildrenMinMaxChanged();
 }
コード例 #8
0
 public void Cleanup()
 {
     // If we only have one child left, this means all views have been dragged out.
     // So we resize the window to be just the toolbar
     // On windows, this might need some special handling for the main menu
     if (children[1].children.Length == 0)
     {
         Rect    r = window.position;
         Toolbar t = (Toolbar)children[0];
         r.height = t.CalcHeight() + kStatusbarHeight;
     }
 }
コード例 #9
0
 protected override void SetPosition(Rect newPos)
 {
     base.SetPosition(newPos);
     if (children.Length == 0)
     {
         return;
     }
     if (children.Length > 2)
     {
         // toolbar - dock area view - status bar
         Toolbar t = (Toolbar)children[0];
         children[0].position = new Rect(0, 0, newPos.width, t.CalcHeight());
         children[1].position = new Rect(0, t.CalcHeight(), newPos.width, newPos.height - t.CalcHeight() - children[2].position.height);
         children[2].position = new Rect(0, newPos.height - children[2].position.height, newPos.width, children[2].position.height);
     }
     else
     {
         // dock area view - status bar
         children[0].position = new Rect(0, 0, newPos.width, newPos.height - children[1].position.height);
         children[1].position = new Rect(0, newPos.height - children[1].position.height, newPos.width, children[1].position.height);
     }
 }
コード例 #10
0
        public void Cleanup()
        {
            // If we only have one child left, this means all views have been dragged out.
            // So we resize the window to be just the toolbar
            // On windows, this might need some special handling for the main menu
            if (children.Length == 3 && children[1].children.Length == 0)
            {
                Rect    r = window.position;
                Toolbar t = children[0] as Toolbar;
                topViewHeight = t != null?t.CalcHeight() : topViewHeight;

                r.height = topViewHeight + bottomViewHeight;
            }
        }
コード例 #11
0
 protected override void ChildrenMinMaxChanged()
 {
     if (children.Length == 3 && children[0] is Toolbar)
     {
         // toolbar - dock area view - status bar
         Toolbar t   = (Toolbar)children[0];
         var     min = new Vector2(minSize.x, Mathf.Max(minSize.y, t.CalcHeight() + bottomViewHeight + children[1].minSize.y));
         SetMinMaxSizes(min, maxSize);
     }
     else if (children.Length == 2)
     {
         // dock area view - status bar
         var min = new Vector2(minSize.x, Mathf.Max(minSize.y, bottomViewHeight + children[1].minSize.y));
         SetMinMaxSizes(min, maxSize);
     }
     base.ChildrenMinMaxChanged();
 }
コード例 #12
0
        protected override void SetPosition(Rect newPos)
        {
            base.SetPosition(newPos);
            if (children.Length == 0)
            {
                return;
            }
            if (children.Length > 2)
            {
                // toolbar - dock area view - status bar
                Toolbar t = children[0] as Toolbar;
                topViewHeight = t != null?t.CalcHeight() : topViewHeight;

                children[0].position = new Rect(0, 0, newPos.width, topViewHeight);
                children[1].position = new Rect(0, topViewHeight, newPos.width, newPos.height - topViewHeight - children[2].position.height);
                children[2].position = new Rect(0, newPos.height - children[2].position.height, newPos.width, children[2].position.height);
            }
            else
            {
                // dock area view - status bar
                if (useBottomView)
                {
                    children[0].position = new Rect(0, 0, newPos.width, newPos.height - children[1].position.height);
                    children[1].position = new Rect(0, newPos.height - children[1].position.height, newPos.width, children[1].position.height);
                }
                else if (useTopView)
                {
                    Toolbar t = children[0] as Toolbar;
                    topViewHeight = t != null?t.CalcHeight() : topViewHeight;

                    children[0].position = new Rect(0, 0, newPos.width, topViewHeight);
                    children[1].position = new Rect(0, children[0].position.height, newPos.width, newPos.height - children[0].position.height);
                }
                else
                {
                    children[0].position = new Rect(0, 0, newPos.width, newPos.height);
                }
            }
        }