C# Class UnityEngine.GUIStyle

ファイルを表示 Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Private Properties

Property Type Description
AssignRectOffset void
AssignStyleState void
CalcSizeWithConstraints Vector2
Cleanup void
CleanupRoots void
DrawPrefixLabel void
DrawWithTextSelection void
GetFontInternal Font
GetFontInternalDuringLoadingThread Font
GetNumCharactersThatFitWithinWidth int
GetRectOffsetPtr System.IntPtr
GetStyleStatePtr System.IntPtr
INTERNAL_CALL_GetRectOffsetPtr void
INTERNAL_CALL_GetStyleStatePtr void
INTERNAL_CALL_Internal_CalcSizeWithConstraints void
INTERNAL_CALL_Internal_Draw2 void
INTERNAL_CALL_Internal_DrawCursor void
INTERNAL_CALL_Internal_DrawPrefixLabel void
INTERNAL_CALL_Internal_GetCursorPixelPosition void
INTERNAL_CALL_Internal_GetCursorStringIndex int
INTERNAL_CALL_SetMouseTooltip void
INTERNAL_get_Internal_clipOffset void
INTERNAL_get_contentOffset void
INTERNAL_set_Internal_clipOffset void
INTERNAL_set_contentOffset void
Init void
InitCopy void
InternalOnAfterDeserialize void
Internal_CalcHeight float
Internal_CalcMinMaxWidth void
Internal_CalcSize void
Internal_CalcSizeWithConstraints void
Internal_Draw void
Internal_Draw void
Internal_Draw2 void
Internal_DrawCursor void
Internal_DrawPrefixLabel void
Internal_DrawWithTextSelection void
Internal_GetCursorFlashOffset float
Internal_GetCursorPixelPosition void
Internal_GetCursorStringIndex int
Internal_GetLineHeight float
Internal_GetNumCharactersThatFitWithinWidth int
SetDefaultFont void
SetFontInternal void
SetMouseTooltip void

Public Methods

Method Description
CalcHeight ( GUIContent content, float width ) : float

How tall this element will be when rendered with content and a specific width.

CalcMinMaxWidth ( GUIContent content, float &minWidth, float &maxWidth ) : void
CalcScreenSize ( Vector2 contentSize ) : Vector2

Calculate the size of an element formatted with this style, and a given space to content.

CalcSize ( GUIContent content ) : Vector2

Calculate the size of some content if it is rendered with this style.

Draw ( Rect position, GUIContent content, bool isHover, bool isActive, bool on, bool hasKeyboardFocus ) : void

Draw the GUIStyle with text and an image inside. If the image is too large to fit within the content area of the style it is scaled down.

Draw ( Rect position, GUIContent content, int controlID ) : void

Draw the GUIStyle with text and an image inside. If the image is too large to fit within the content area of the style it is scaled down.

Draw ( Rect position, GUIContent content, int controlID, bool on ) : void

Draw the GUIStyle with text and an image inside. If the image is too large to fit within the content area of the style it is scaled down.

Draw ( Rect position, Texture image, bool isHover, bool isActive, bool on, bool hasKeyboardFocus ) : void

Draw the GUIStyle with an image inside. If the image is too large to fit within the content area of the style it is scaled down.

Draw ( Rect position, bool isHover, bool isActive, bool on, bool hasKeyboardFocus ) : void

Draw this GUIStyle on to the screen, internal version.

Draw ( Rect position, string text, bool isHover, bool isActive, bool on, bool hasKeyboardFocus ) : void

Draw the GUIStyle with a text string inside.

DrawCursor ( Rect position, GUIContent content, int controlID, int Character ) : void

Draw this GUIStyle with selected content.

DrawWithTextSelection ( Rect position, GUIContent content, int controlID, int firstSelectedCharacter, int lastSelectedCharacter ) : void

Draw this GUIStyle with selected content.

GUIStyle ( ) : System

Constructor for empty GUIStyle.

GUIStyle ( GUIStyle other ) : System

Constructs GUIStyle identical to given other GUIStyle.

GetCursorPixelPosition ( Rect position, GUIContent content, int cursorStringIndex ) : Vector2

Get the pixel position of a given string index.

GetCursorStringIndex ( Rect position, GUIContent content, Vector2 cursorPixelPosition ) : int

Get the cursor position (indexing into contents.text) when the user clicked at cursorPixelPosition.

ToString ( ) : string

Private Methods

Method Description
AssignRectOffset ( int idx, IntPtr srcRectOffset ) : void
AssignStyleState ( int idx, IntPtr srcStyleState ) : void
CalcSizeWithConstraints ( GUIContent content, Vector2 constraints ) : Vector2
Cleanup ( ) : void
CleanupRoots ( ) : void
DrawPrefixLabel ( Rect position, GUIContent content, int controlID ) : void
DrawWithTextSelection ( Rect position, GUIContent content, int controlID, int firstSelectedCharacter, int lastSelectedCharacter, bool drawSelectionAsComposition ) : void
GetFontInternal ( ) : Font
GetFontInternalDuringLoadingThread ( ) : Font
GetNumCharactersThatFitWithinWidth ( string text, float width ) : int
GetRectOffsetPtr ( int idx ) : IntPtr
GetStyleStatePtr ( int idx ) : IntPtr
INTERNAL_CALL_GetRectOffsetPtr ( GUIStyle self, int idx, IntPtr &value ) : void
INTERNAL_CALL_GetStyleStatePtr ( GUIStyle self, int idx, IntPtr &value ) : void
INTERNAL_CALL_Internal_CalcSizeWithConstraints ( IntPtr target, GUIContent content, Vector2 &maxSize, Vector2 &ret ) : void
INTERNAL_CALL_Internal_Draw2 ( IntPtr style, Rect &position, GUIContent content, int controlID, bool on ) : void
INTERNAL_CALL_Internal_DrawCursor ( IntPtr target, Rect &position, GUIContent content, int pos, Color &cursorColor ) : void
INTERNAL_CALL_Internal_DrawPrefixLabel ( IntPtr style, Rect &position, GUIContent content, int controlID, bool on ) : void
INTERNAL_CALL_Internal_GetCursorPixelPosition ( IntPtr target, Rect &position, GUIContent content, int cursorStringIndex, Vector2 &ret ) : void
INTERNAL_CALL_Internal_GetCursorStringIndex ( IntPtr target, Rect &position, GUIContent content, Vector2 &cursorPixelPosition ) : int
INTERNAL_CALL_SetMouseTooltip ( GUIStyle self, string tooltip, Rect &screenRect ) : void
INTERNAL_get_Internal_clipOffset ( Vector2 &value ) : void
INTERNAL_get_contentOffset ( Vector2 &value ) : void
INTERNAL_set_Internal_clipOffset ( Vector2 &value ) : void
INTERNAL_set_contentOffset ( Vector2 &value ) : void
Init ( ) : void
InitCopy ( GUIStyle other ) : void
InternalOnAfterDeserialize ( ) : void
Internal_CalcHeight ( IntPtr target, GUIContent content, float width ) : float
Internal_CalcMinMaxWidth ( IntPtr target, GUIContent content, float &minWidth, float &maxWidth ) : void
Internal_CalcSize ( IntPtr target, GUIContent content, Vector2 &ret ) : void
Internal_CalcSizeWithConstraints ( IntPtr target, GUIContent content, Vector2 maxSize, Vector2 &ret ) : void
Internal_Draw ( GUIContent content, Internal_DrawArguments &arguments ) : void
Internal_Draw ( IntPtr target, Rect position, GUIContent content, bool isHover, bool isActive, bool on, bool hasKeyboardFocus ) : void
Internal_Draw2 ( IntPtr style, Rect position, GUIContent content, int controlID, bool on ) : void
Internal_DrawCursor ( IntPtr target, Rect position, GUIContent content, int pos, Color cursorColor ) : void
Internal_DrawPrefixLabel ( IntPtr style, Rect position, GUIContent content, int controlID, bool on ) : void
Internal_DrawWithTextSelection ( GUIContent content, Internal_DrawWithTextSelectionArguments &arguments ) : void
Internal_GetCursorFlashOffset ( ) : float
Internal_GetCursorPixelPosition ( IntPtr target, Rect position, GUIContent content, int cursorStringIndex, Vector2 &ret ) : void
Internal_GetCursorStringIndex ( IntPtr target, Rect position, GUIContent content, Vector2 cursorPixelPosition ) : int
Internal_GetLineHeight ( IntPtr target ) : float
Internal_GetNumCharactersThatFitWithinWidth ( IntPtr target, string text, float width ) : int
SetDefaultFont ( Font font ) : void
SetFontInternal ( Font value ) : void
SetMouseTooltip ( string tooltip, Rect screenRect ) : void

Method Details

CalcHeight() public method

How tall this element will be when rendered with content and a specific width.

public CalcHeight ( GUIContent content, float width ) : float
content GUIContent
width float
return float

CalcMinMaxWidth() public method

public CalcMinMaxWidth ( GUIContent content, float &minWidth, float &maxWidth ) : void
content GUIContent
minWidth float
maxWidth float
return void

CalcScreenSize() public method

Calculate the size of an element formatted with this style, and a given space to content.

public CalcScreenSize ( Vector2 contentSize ) : Vector2
contentSize Vector2
return Vector2

CalcSize() public method

Calculate the size of some content if it is rendered with this style.

public CalcSize ( GUIContent content ) : Vector2
content GUIContent
return Vector2

Draw() public method

Draw the GUIStyle with text and an image inside. If the image is too large to fit within the content area of the style it is scaled down.

public Draw ( Rect position, GUIContent content, bool isHover, bool isActive, bool on, bool hasKeyboardFocus ) : void
position Rect
content GUIContent
isHover bool
isActive bool
on bool
hasKeyboardFocus bool
return void

Draw() public method

Draw the GUIStyle with text and an image inside. If the image is too large to fit within the content area of the style it is scaled down.

public Draw ( Rect position, GUIContent content, int controlID ) : void
position Rect
content GUIContent
controlID int
return void

Draw() public method

Draw the GUIStyle with text and an image inside. If the image is too large to fit within the content area of the style it is scaled down.

public Draw ( Rect position, GUIContent content, int controlID, bool on ) : void
position Rect
content GUIContent
controlID int
on bool
return void

Draw() public method

Draw the GUIStyle with an image inside. If the image is too large to fit within the content area of the style it is scaled down.

public Draw ( Rect position, Texture image, bool isHover, bool isActive, bool on, bool hasKeyboardFocus ) : void
position Rect
image Texture
isHover bool
isActive bool
on bool
hasKeyboardFocus bool
return void

Draw() public method

Draw this GUIStyle on to the screen, internal version.

public Draw ( Rect position, bool isHover, bool isActive, bool on, bool hasKeyboardFocus ) : void
position Rect
isHover bool
isActive bool
on bool
hasKeyboardFocus bool
return void

Draw() public method

Draw the GUIStyle with a text string inside.

public Draw ( Rect position, string text, bool isHover, bool isActive, bool on, bool hasKeyboardFocus ) : void
position Rect
text string
isHover bool
isActive bool
on bool
hasKeyboardFocus bool
return void

DrawCursor() public method

Draw this GUIStyle with selected content.

public DrawCursor ( Rect position, GUIContent content, int controlID, int Character ) : void
position Rect
content GUIContent
controlID int
Character int
return void

DrawWithTextSelection() public method

Draw this GUIStyle with selected content.

public DrawWithTextSelection ( Rect position, GUIContent content, int controlID, int firstSelectedCharacter, int lastSelectedCharacter ) : void
position Rect
content GUIContent
controlID int
firstSelectedCharacter int
lastSelectedCharacter int
return void

GUIStyle() public method

Constructor for empty GUIStyle.

public GUIStyle ( ) : System
return System

GUIStyle() public method

Constructs GUIStyle identical to given other GUIStyle.

public GUIStyle ( GUIStyle other ) : System
other GUIStyle
return System

GetCursorPixelPosition() public method

Get the pixel position of a given string index.

public GetCursorPixelPosition ( Rect position, GUIContent content, int cursorStringIndex ) : Vector2
position Rect
content GUIContent
cursorStringIndex int
return Vector2

GetCursorStringIndex() public method

Get the cursor position (indexing into contents.text) when the user clicked at cursorPixelPosition.

public GetCursorStringIndex ( Rect position, GUIContent content, Vector2 cursorPixelPosition ) : int
position Rect
content GUIContent
cursorPixelPosition Vector2
return int

ToString() public method

public ToString ( ) : string
return string