ModalWindow.OnGUI C# (CSharp) Method

OnGUI() protected method

protected OnGUI ( ) : void
return void
    protected virtual void OnGUI()
    {
        if (Render) {
            //GUILayout automatically lays out the GUI window to contain all the text
            windowRect = GUILayout.Window (id, windowRect, DoModalWindow, windowTitle);
            //prevents GUI window from dragging off window screen
            windowRect.x = Mathf.Clamp(windowRect.x,0,Screen.width-windowRect.width);
            windowRect.y = Mathf.Clamp(windowRect.y,0,Screen.height-windowRect.height);
            //Resizing GUI window
            windowRect = ResizeWindow (windowRect, ref isResizing, ref resizeStart, minWindowSize);
        }
    }