public static bool PopupButton(GUIContent label, GUIContent buttonContent, GUIStyle style, out Rect buttonRect, params GUILayoutOption[] options)
{
if (label != null)
{
Rect position = EditorGUILayout.s_LastRect = EditorGUILayout.GetControlRect(true, 16f, style, options);
int id = GUIUtility.GetControlID("EditorPopup".GetHashCode(), FocusType.Keyboard, position);
buttonRect = EditorGUI.PrefixLabel(position, id, label);
}
else
{
Rect rect2 = GUILayoutUtility.GetRect(buttonContent, style, options);
buttonRect = rect2;
}
return EditorGUI.ButtonMouseDown(buttonRect, buttonContent, FocusType.Passive, style);
}