GetRect() public method

public GetRect ( ) : Rect
return UnityEngine.Rect
Example #1
0
        protected void CalcOuterCoords()
        {
            if (IsOpen && term != null)
            {
                Rect tRect = term.GetRect();

                // Glue it to the bottom of the attached term window - move wherever it moves:
                float left = tRect.xMin;
                float top  = tRect.yMin + tRect.height;

                // If it hasn't been given a size yet, then give it a starting size that matches
                // the attached terminal window size.  Otherwise keep whatever size the user changed it to:
                if (WindowRect.width == 0)
                {
                    WindowRect = new Rect(left, top, tRect.width, tRect.height);
                }
                else
                {
                    WindowRect = new Rect(left, top, WindowRect.width, WindowRect.height);
                }
            }
        }