public static bool MaskFoldout(string header, bool display) { float lw = EditorGUIUtility.labelWidth - 13; GUILayoutOption clickArea = GUILayout.MaxWidth(lw); Rect rect = GUILayoutUtility.GetRect(0, 18f, clickArea); MGUI.SpaceN24(); header = " " + header; EditorGUILayout.LabelField(header); MGUI.Space24(); return(DoMaskToggle(display, rect)); }
public static bool DoMediumFoldoutError(Dictionary <Material, Toggles> foldouts, Material mat, MaterialEditor me, bool errorCond, int buttonCount, string header) { foldouts[mat].SetState(header, MediumFoldoutError(header, foldouts[mat].GetState(header), errorCond, buttonCount, me, mat)); MGUI.Space24(); return(foldouts[mat].GetState(header)); }