SirenixEditorGUI.IconButton does not use the tooltip passed into the call.

Issue #697 resolved
Jorian Baeke created an issue

The function IconButton in SirenixEditorGUI (EditorIcon variant) does not use the tooltip parameter it is given as demonstrated below:

SirenixEditorGUI.cs

public static bool IconButton(Rect rect, EditorIcon icon, GUIStyle style, string tooltip)
{
  style = style ?? SirenixGUIStyles.IconButton;
  if (GUI.Button(rect, GUIContent.none, style))
  {
    GUIHelper.RemoveFocusControl();
    return true;
  }
  if (Event.current.type == EventType.Repaint)
  {
    float drawSize = Mathf.Min(rect.height, rect.width);
    icon.Draw(rect, drawSize);
  }
  return false;
}

Comments (1)

  1. Antonio Rafael Antunes Miranda

    Fixed in version 3.0.3.0

    • All overloads of SirenixEditorGUI.IconButton now properly pass in the tooltip string they are given to the GUI.Button() call. However, note that this doesn't always mean that Unity's GUI.Button() will decide to make use of the tooltip and display it properly in all cases.
  2. Log in to comment