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 (!FullWindowService.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; }
public static bool DocumentationWithLinkClickOpen(string text, string link, string linkName = null, string tip = "", int buttonSize = 20) { if (tip.IsNullOrEmpty()) { tip = icon.Question.GetDescription(); } if (DocumentationClickOpen(tip, buttonSize)) { FullWindowService.popUpText = text; FullWindowService.InitiatePopUp(); FullWindowService.relatedLink = link; FullWindowService.relatedLinkName = linkName.IsNullOrEmpty() ? link : linkName; return(true); } return(false); }
public static void AreYouSureOpen(Action action, string header = "", string text = "") { if (header.IsNullOrEmpty()) { header = Msg.AreYouSure.GetText(); } if (text.IsNullOrEmpty()) { text = Msg.ClickYesToConfirm.GetText(); } FullWindowService.areYouSureFunk = action; FullWindowService.popUpText = text; FullWindowService.popUpHeader = header; FullWindowService.InitiatePopUp(); }