GUIStyleExtensions¶
Namespace:
SideXP.Core
Extension functions for GUIStyle instances.
Fields¶
MinFontSize¶
MaxFontSize¶
Methods¶
Margin(GUIStyle, int, int, int, int)¶
Copies the input style, and sets the margins.
Parameters
style: The style you want to update.left: The left margin.right: The right margin.top: The top margin.bottom: The bottom margin.
Margin(GUIStyle, int, int)¶
Copies the input style, and sets the margins.
Parameters
horizontal: The left and right margin.vertical: The top and bottom margin.style: The style you want to update.
Margin(GUIStyle, RectOffset)¶
Copies the input style, and sets the margins.
Parameters
margin: The margin to set.style: The style you want to update.
Padding(GUIStyle, int, int, int, int)¶
Copies the input style, and sets the padding.
Parameters
left: The left padding.right: The right padding.top: The top padding.bottom: The bottom padding.style: The style you want to update.
Padding(GUIStyle, int, int)¶
Copies the input style, and sets the padding.
Parameters
horizontal: The left and right padding.vertical: The top and bottom padding.
Padding(GUIStyle, RectOffset)¶
Copies the input style, and sets the padding.
Parameters
padding: The padding to set.
WordWrap(GUIStyle, bool)¶
Copies the input style, and enables/disables word wrapping.
Parameters
enable: Is word wrapping enabled?style: The style you want to update.
RichText(GUIStyle, bool)¶
Copies the input style, and enables/disables rich text mode.
Parameters
enable: Is rich text enabled?style: The style you want to update.
StretchWidth(GUIStyle, bool)¶
Copies the input style, and enables/disables width stretching.
Parameters
enable: Is stretching enabled?style: The style you want to update.
StretchHeight(GUIStyle, bool)¶
Copies the input style, and enables/disables height stretching.
Parameters
enable: Is stretching enabled?style: The style you want to update.
Stretch(GUIStyle, bool, bool)¶
Copies the input style, and enables/disables width and height stretching.
Parameters
stretchWidth: Is width stretching enabled?stretchHeight: Is height stretching enabled?style: The style you want to update.
FontSize(GUIStyle, int)¶
Copies the input style, and sets the given font size.
Parameters
fontSize: The font size to set.style: The style you want to update.
FontSizeDiff(GUIStyle, int)¶
Copies the input style, and set the font size by adding the given difference to the original size.
Parameters
diff: The difference to add to the original font size.
FontColor(GUIStyle, Color)¶
Copies the input style, and sets the given font color on normal state.
Parameters
color: The font color to set.style: The style you want to update.
FontStyle(GUIStyle, FontStyle)¶
Copies the input style, and sets the font style.
Parameters
fontStyle: The font style to set.style: The style you want to update.
TextAlignment(GUIStyle, TextAnchor)¶
Copies the input style, and sets the text alignment.
Parameters
alignment: The text alignment to set.style: The style you want to update.
AlignLeft(GUIStyle)¶
Copies the input style, and sets the text alignment to MiddleLeft.
AlignCenter(GUIStyle)¶
Copies the input style, and sets the text alignment to MiddleCenter.
AlignRight(GUIStyle)¶
Copies the input style, and sets the text alignment to MiddleRight.
BoldItalic(GUIStyle)¶
Copies the input style, and sets the font style to BoldAndItalic.
Parameters
style: The style you want to update.
Bold(GUIStyle)¶
Copies the input style, and sets the font style to Bold.
Italic(GUIStyle)¶
Copies the input style, and sets the font style to Italic.