private void DrawFunctionWrapper(int windowID) { PaintingGameViewUI = true; ef.globChanged = false; _elementIndex = 0; _lineOpen = false; focusInd = 0; try { if (!UseWindow) { GUI.matrix = Matrix4x4.TRS(new Vector3(0, 0, 0), Quaternion.identity, new Vector3(upscale, upscale, 1)); GUILayout.BeginArea(new Rect(40 / upscale, 20 / upscale, Screen.width / upscale, Screen.height / upscale)); } if (!PopUpService.ShowingPopup()) { _function(); } nl(); UnIndent(); (GUI.tooltip.IsNullOrEmpty() ? "" : "{0}:{1}".F(Msg.ToolTip.GetText(), GUI.tooltip)).nl(PEGI_Styles.HintText); if (UseWindow) { if (_windowRect.Contains(Input.mousePosition)) { MouseOverUI = true; } GUI.DragWindow(new Rect(0, 0, 3000, 40 * upscale)); } else { MouseOverUI = true; GUILayout.EndArea(); } } catch (Exception ex) { Debug.LogError(ex); } PaintingGameViewUI = false; }