public void Draw(Rect position, GUIContent content, 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"); return; } GUIStyle.Internal_Draw(this.m_Ptr, position, content, isHover, isActive, on, hasKeyboardFocus); }
/// <summary> /// <para>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.</para> /// </summary> /// <param name="position"></param> /// <param name="image"></param> /// <param name="isHover"></param> /// <param name="isActive"></param> /// <param name="on"></param> /// <param name="hasKeyboardFocus"></param> public void Draw(Rect position, Texture image, bool isHover, bool isActive, bool on, bool hasKeyboardFocus) { if (Event.current.type != EventType.Repaint) { Debug.LogError((object)"Style.Draw may not be called if it is not a repaint event"); } else { GUIStyle.Internal_Draw(this.m_Ptr, position, GUIContent.Temp(image), isHover, isActive, on, hasKeyboardFocus); } }
private static void Internal_Draw(IntPtr target, Rect position, GUIContent content, bool isHover, bool isActive, bool on, bool hasKeyboardFocus) { Internal_DrawArguments internal_DrawArguments = default(Internal_DrawArguments); internal_DrawArguments.target = target; internal_DrawArguments.position = position; internal_DrawArguments.isHover = ((!isHover) ? 0 : 1); internal_DrawArguments.isActive = ((!isActive) ? 0 : 1); internal_DrawArguments.on = ((!on) ? 0 : 1); internal_DrawArguments.hasKeyboardFocus = ((!hasKeyboardFocus) ? 0 : 1); GUIStyle.Internal_Draw(content, ref internal_DrawArguments); }
private static void Internal_Draw(IntPtr target, Rect position, GUIContent content, bool isHover, bool isActive, bool on, bool hasKeyboardFocus) { GUIStyle.Internal_Draw(content, ref new Internal_DrawArguments() { target = target, position = position, isHover = !isHover ? 0 : 1, isActive = !isActive ? 0 : 1, on = !on ? 0 : 1, hasKeyboardFocus = !hasKeyboardFocus ? 0 : 1 }); }
public void Draw(Rect position, GUIContent content, bool isHover, bool isActive, bool on, bool hasKeyboardFocus) { GUIStyle.Internal_Draw(this.m_Ptr, position, content, isHover, isActive, on, hasKeyboardFocus); }
public void Draw(Rect position, Texture image, bool isHover, bool isActive, bool on, bool hasKeyboardFocus) { GUIStyle.Internal_Draw(this.m_Ptr, position, GUIContent.Temp(image), isHover, isActive, on, hasKeyboardFocus); }