public static bool enter_Inspect_AsList(this IPEGI_ListInspect var, ref bool entered) { var tmpEnt = entered ? 1 : -1; var ret = var.enter_Inspect_AsList(ref tmpEnt, 1); entered = tmpEnt == 1; return(ret); }
public static bool enter_Inspect(this string label, IPEGI_ListInspect var, ref int enteredOne, int thisOne) { if (enteredOne == -1 && label.TryAddCount(var).ClickLabel(style: PEGI_Styles.EnterLabel)) { enteredOne = thisOne; } return(var.enter_Inspect_AsList(ref enteredOne, thisOne, label)); }
public static bool conditional_enter_inspect(this IPEGI_ListInspect obj, bool canEnter, ref int enteredOne, int thisOne) { if (!canEnter && enteredOne == thisOne) { enteredOne = -1; } if (canEnter) { return(obj.enter_Inspect_AsList(ref enteredOne, thisOne)); } ef.isFoldedOutOrEntered = false; return(false); }
public static bool Inspect_AsInList(this IPEGI_ListInspect obj) { var tmp = -1; var il = IndentLevel; var changes = obj.InspectInList(null, 0, ref tmp); IndentLevel = il; if (ef.globChanged || changes) { #if UNITY_EDITOR ef.ClearFromPooledSerializedObjects(obj as Object); #endif obj.SetToDirty_Obj(); } return(changes); }
public static bool enter_Inspect_AsList(this IPEGI_ListInspect var, ref int enteredOne, int thisOne, string exitLabel = null) { var changed = false; var outside = enteredOne == -1; if (!var.IsNullOrDestroyed_Obj()) { if (outside) { var.InspectInList(null, thisOne, ref enteredOne).changes(ref changed); } else if (enteredOne == thisOne) { if (exitLabel.IsNullOrEmpty()) { exitLabel = var.GetNameForInspector(); } if (icon.Exit.ClickUnFocus("{0} L {1}".F(icon.Exit.GetText(), var)) || exitLabel.ClickLabel(icon.Exit.GetDescription(), style: PEGI_Styles.ExitLabel)) { enteredOne = -1; } Try_Nested_Inspect(var).changes(ref changed); } } else if (enteredOne == thisOne) { enteredOne = -1; } ef.isFoldedOutOrEntered = enteredOne == thisOne; return(changed); }