Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

GUIStyle.Draw

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

Description

Draw this GUIStyle on to the screen, internal version.

Draw plain GUIStyle without text nor image.

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

Description

Draw the GUIStyle with a text string inside.

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

Description

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(position: Rect, content: GUIContent, controlID: int, on: bool = false): void;
Draw(position: Rect, content: GUIContent, isHover: bool, isActive: bool, on: bool, hasKeyboardFocus: bool): void;

Description

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.