UnityEngine.GUIStyle.Draw C# (CSharp) Method

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
        public void Draw(Rect position, string text, bool isHover, bool isActive, bool on, bool hasKeyboardFocus)
        {
            if (Event.current.type != EventType.Repaint)
            {
                Debug.LogError("Style.Draw may not be called if it is not a repaint event");
            }
            else
            {
                Internal_Draw(this.m_Ptr, position, GUIContent.Temp(text), isHover, isActive, on, hasKeyboardFocus);
            }
        }

Same methods

GUIStyle::Draw ( Rect position, GUIContent content, bool isHover, bool isActive, bool on, bool hasKeyboardFocus ) : void
GUIStyle::Draw ( Rect position, GUIContent content, int controlID ) : void
GUIStyle::Draw ( Rect position, GUIContent content, int controlID, bool on ) : void
GUIStyle::Draw ( Rect position, Texture image, bool isHover, bool isActive, bool on, bool hasKeyboardFocus ) : void
GUIStyle::Draw ( Rect position, bool isHover, bool isActive, bool on, bool hasKeyboardFocus ) : void

Usage Example

コード例 #1
0
		public virtual void OnPreviewGUI(Rect r, GUIStyle background)
		{
			if (Event.current.type == EventType.Repaint)
			{
				background.Draw(r, false, false, false, false);
			}
		}
All Usage Examples Of UnityEngine.GUIStyle::Draw