Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

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

GUIStyle.Draw

public function 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.

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

Description

Draw the GUIStyle with a text string inside.

public function 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.

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