private static bool ClickText(this GUIContent content, PegiGuiStyle style) { #if UNITY_EDITOR if (!PaintingGameViewUI) { return(ef.Click(content, style.Current)); } #endif checkLine(); return(GUILayout.Button(content, style.Current, GuiMaxWidthOptionFrom(content, style: style)).Dirty()); }
private static bool InspectInteranl(this string StyleName, PegiGuiStyle style) { if (StyleName.enter(ref _inspectedFont, _iteratiedFont).nl()) { "Example text in {0} style ".F(StyleName).nl(style); style.Nested_Inspect().nl(); } _iteratiedFont++; return(false); }
public static bool ClickLabel(this string label, string hint = "ClickAble Text", int width = -1, PegiGuiStyle style = null) { SetBgColor(Color.clear); GUIStyle st = style == null ? ClickableText.Current : style.Current; textAndTip.text = label; textAndTip.tooltip = hint; #if UNITY_EDITOR if (!PaintingGameViewUI) { return((width == -1 ? ef.Click(textAndTip, st) : ef.Click(textAndTip, width, st)).UnFocusIfTrue() .RestoreBGColor()); } #endif checkLine(); return((width == -1 ? GUILayout.Button(textAndTip, st, GuiMaxWidthOptionFrom(label, st)) : GUILayout.Button(textAndTip, st, GUILayout.MaxWidth(width))).DirtyUnFocus().PreviousBgColor()); }
public static bool ClickText(this string label, PegiGuiStyle style) => TextAndTip(label).ClickText(style);
public static bool ClickLabelConfirm(this string label, string confirmationTag, string hint = "ClickAble Text", int width = -1, PegiGuiStyle style = null) { if (ConfirmationDialogue.IsRequestedFor(confirmationTag)) { return(ConfirmClick()); } if (label.ClickLabel(hint: hint, width: width, style: style)) { ConfirmationDialogue.Request(confirmationTag, details: hint); } return(false); }