C# Класс UnityEngine.GUIStyle

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

CalcHeight() публичный Метод

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
Результат float

CalcMinMaxWidth() публичный Метод

public CalcMinMaxWidth ( GUIContent content, float &minWidth, float &maxWidth ) : void
content GUIContent
minWidth float
maxWidth float
Результат void

CalcScreenSize() публичный Метод

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

public CalcScreenSize ( Vector2 contentSize ) : Vector2
contentSize Vector2
Результат Vector2

CalcSize() публичный Метод

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

public CalcSize ( GUIContent content ) : Vector2
content GUIContent
Результат Vector2

Draw() публичный Метод

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
Результат void

Draw() публичный Метод

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
Результат void

Draw() публичный Метод

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
Результат void

Draw() публичный Метод

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
Результат void

Draw() публичный Метод

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
Результат void

Draw() публичный Метод

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
Результат void

DrawCursor() публичный Метод

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
Результат void

DrawWithTextSelection() публичный Метод

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
Результат void

GUIStyle() публичный Метод

Constructor for empty GUIStyle.

public GUIStyle ( ) : System
Результат System

GUIStyle() публичный Метод

Constructs GUIStyle identical to given other GUIStyle.

public GUIStyle ( GUIStyle other ) : System
other GUIStyle
Результат System

GetCursorPixelPosition() публичный Метод

Get the pixel position of a given string index.

public GetCursorPixelPosition ( Rect position, GUIContent content, int cursorStringIndex ) : Vector2
position Rect
content GUIContent
cursorStringIndex int
Результат Vector2

GetCursorStringIndex() публичный Метод

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
Результат int

ToString() публичный Метод

public ToString ( ) : string
Результат string