/// <summary> /// Use this method to draw a seperator /// </summary> /// <remarks> /// Use this method to draw a seperator for a spacing between two elements /// </remarks> /// <param name="theStyleSeparator">the style of the seperator</param> /// <param name="theLayout">GUILayout options</param> public static void Separator(eStyleSeparator theStyleSeparator, params GUILayoutOption[] theLayout) { Init(); if(itsSkinIndex == -1) { GUILayout.Label("|",theLayout); } else { GUILayout.Label("", GetStyleSeparator(theStyleSeparator),theLayout); } }
/// <summary> /// returns the requested guistyle for a seperator /// </summary> /// <param name="theStyleSeparator">the type of the seperator</param> /// <returns>returns the requested seperator style. Returns the default label style if no custom style was found.</returns> public static GUIStyle GetStyleSeparator(eStyleSeparator theStyleSeparator) { if(itsSkinIndex == -1) return GUI.skin.box; Init(); if(theStyleSeparator == eStyleSeparator.eSeparatorHorizontal && itsStyleSeparatorHorizontal[itsSkinIndex] != null) { return itsStyleSeparatorHorizontal[itsSkinIndex]; } else if(theStyleSeparator == eStyleSeparator.eSeparatorVertical && itsStyleSeparatorVertical[itsSkinIndex] != null) { return itsStyleSeparatorVertical[itsSkinIndex]; } else if(theStyleSeparator == eStyleSeparator.eSeparatorVerticalFitInBox && itsStyleSeparatorVerticalFitInBox[itsSkinIndex] != null) { return itsStyleSeparatorVerticalFitInBox[itsSkinIndex]; } return GUI.skin.label; }