Class GUIStyle
Assembly: UnityEngine.dll
Syntax
[Serializable]
public sealed class GUIStyle
Constructors
|
Improve this Doc
View Source
GUIStyle()
Declaration
|
Improve this Doc
View Source
GUIStyle(GUIStyle)
Declaration
public GUIStyle(GUIStyle other)
Parameters
Properties
|
Improve this Doc
View Source
active
Declaration
public GUIStyleState active { get; set; }
Property Value
alignment
Declaration
public TextAnchor alignment { get; set; }
Property Value
|
Improve this Doc
View Source
border
Declaration
public RectOffset border { get; set; }
Property Value
clipOffset
Declaration
[Obsolete("Don't use clipOffset - put things inside BeginGroup instead. This functionality will be removed in a later version.", false)]
public Vector2 clipOffset { get; set; }
Property Value
clipping
Declaration
public TextClipping clipping { get; set; }
Property Value
contentOffset
Declaration
public Vector2 contentOffset { get; set; }
Property Value
fixedHeight
Declaration
public float fixedHeight { get; set; }
Property Value
fixedWidth
Declaration
public float fixedWidth { get; set; }
Property Value
|
Improve this Doc
View Source
focused
Declaration
public GUIStyleState focused { get; set; }
Property Value
font
Declaration
public Font font { get; set; }
Property Value
fontSize
Declaration
public int fontSize { get; set; }
Property Value
fontStyle
Declaration
public FontStyle fontStyle { get; set; }
Property Value
|
Improve this Doc
View Source
hover
Declaration
public GUIStyleState hover { get; set; }
Property Value
imagePosition
Declaration
public ImagePosition imagePosition { get; set; }
Property Value
|
Improve this Doc
View Source
isHeightDependantOnWidth
Declaration
public bool isHeightDependantOnWidth { get; }
Property Value
|
Improve this Doc
View Source
lineHeight
Declaration
public float lineHeight { get; }
Property Value
|
Improve this Doc
View Source
margin
Declaration
public RectOffset margin { get; set; }
Property Value
name
Declaration
public string name { get; set; }
Property Value
|
Improve this Doc
View Source
none
Declaration
public static GUIStyle none { get; }
Property Value
|
Improve this Doc
View Source
normal
Declaration
public GUIStyleState normal { get; set; }
Property Value
|
Improve this Doc
View Source
onActive
Declaration
public GUIStyleState onActive { get; set; }
Property Value
|
Improve this Doc
View Source
onFocused
Declaration
public GUIStyleState onFocused { get; set; }
Property Value
|
Improve this Doc
View Source
onHover
Declaration
public GUIStyleState onHover { get; set; }
Property Value
|
Improve this Doc
View Source
onNormal
Declaration
public GUIStyleState onNormal { get; set; }
Property Value
|
Improve this Doc
View Source
overflow
Declaration
public RectOffset overflow { get; set; }
Property Value
|
Improve this Doc
View Source
padding
Declaration
public RectOffset padding { get; set; }
Property Value
richText
Declaration
public bool richText { get; set; }
Property Value
stretchHeight
Declaration
public bool stretchHeight { get; set; }
Property Value
stretchWidth
Declaration
public bool stretchWidth { get; set; }
Property Value
wordWrap
Declaration
public bool wordWrap { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
CalcHeight(GUIContent, Single)
Declaration
public float CalcHeight(GUIContent content, float width)
Parameters
Returns
|
Improve this Doc
View Source
CalcMinMaxWidth(GUIContent, out Single, out Single)
Declaration
public void CalcMinMaxWidth(GUIContent content, out float minWidth, out float maxWidth)
Parameters
|
Improve this Doc
View Source
CalcScreenSize(Vector2)
Declaration
public Vector2 CalcScreenSize(Vector2 contentSize)
Parameters
Type |
Name |
Description |
Vector2 |
contentSize |
|
Returns
|
Improve this Doc
View Source
CalcSize(GUIContent)
Declaration
public Vector2 CalcSize(GUIContent content)
Parameters
Returns
|
Improve this Doc
View Source
Draw(Rect, Boolean, Boolean, Boolean, Boolean)
Declaration
public void Draw(Rect position, bool isHover, bool isActive, bool on, bool hasKeyboardFocus)
Parameters
|
Improve this Doc
View Source
Draw(Rect, String, Boolean, Boolean, Boolean, Boolean)
Declaration
public void Draw(Rect position, string text, bool isHover, bool isActive, bool on, bool hasKeyboardFocus)
Parameters
|
Improve this Doc
View Source
Draw(Rect, GUIContent, Boolean, Boolean, Boolean, Boolean)
Declaration
public void Draw(Rect position, GUIContent content, bool isHover, bool isActive, bool on, bool hasKeyboardFocus)
Parameters
|
Improve this Doc
View Source
Draw(Rect, GUIContent, Int32)
Declaration
public void Draw(Rect position, GUIContent content, int controlID)
Parameters
|
Improve this Doc
View Source
Draw(Rect, GUIContent, Int32, Boolean)
Declaration
public void Draw(Rect position, GUIContent content, int controlID, bool on)
Parameters
|
Improve this Doc
View Source
Draw(Rect, Texture, Boolean, Boolean, Boolean, Boolean)
Declaration
public void Draw(Rect position, Texture image, bool isHover, bool isActive, bool on, bool hasKeyboardFocus)
Parameters
|
Improve this Doc
View Source
DrawCursor(Rect, GUIContent, Int32, Int32)
Declaration
public void DrawCursor(Rect position, GUIContent content, int controlID, int character)
Parameters
|
Improve this Doc
View Source
DrawWithTextSelection(Rect, GUIContent, Int32, Int32, Int32)
Declaration
public void DrawWithTextSelection(Rect position, GUIContent content, int controlID, int firstSelectedCharacter, int lastSelectedCharacter)
Parameters
|
Improve this Doc
View Source
Finalize()
Declaration
protected void Finalize()
|
Improve this Doc
View Source
GetCursorPixelPosition(Rect, GUIContent, Int32)
Declaration
public Vector2 GetCursorPixelPosition(Rect position, GUIContent content, int cursorStringIndex)
Parameters
Returns
|
Improve this Doc
View Source
GetCursorStringIndex(Rect, GUIContent, Vector2)
Declaration
public int GetCursorStringIndex(Rect position, GUIContent content, Vector2 cursorPixelPosition)
Parameters
Returns
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
|
Improve this Doc
View Source
Implicit(String to GUIStyle)
Declaration
public static implicit operator GUIStyle(string str)
Parameters
Type |
Name |
Description |
String |
str |
|
Returns
Extension Methods