/// <summary> /// Draw button which is similar to default "Add Component" Unity button. /// </summary> public static bool DrawAddButton(ref Rect rect, string label) { Rect buttonRect = EditorDrawingHelper.CalculateAddButtonRect(ref rect); GUIStyle style = new GUIStyle(GUI.skin.button) { fontSize = 12 }; rect.height -= VerticalSpacing; return(GUI.Button(buttonRect, new GUIContent(label), style)); }
/// <summary> /// Draw a help button next to the 'Add Behavior' / 'Add Condition' button. /// </summary> public static bool DrawHelpButton(ref Rect rect) { Rect addbuttonRect = EditorDrawingHelper.CalculateAddButtonRect(ref rect); Rect helpbuttonRect = addbuttonRect; helpbuttonRect.size = addHelpButtonSize; helpbuttonRect.x = addbuttonRect.x + addbuttonRect.width + 5; GUIStyle style = new GUIStyle(GUI.skin.button) { fontSize = 12 }; return(GUI.Button(helpbuttonRect, helpIcon.Texture, style)); }