Skip to content

Commit

Permalink
Use EditorGUILayout.DropdownButton for UI dropdown buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
robinnorth committed Apr 29, 2021
1 parent 9a7c954 commit a21505c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Allow BuildActions to draw custom serialized property fields

### Changed

- Use `EditorGUILayout.DropdownButton` for UI dropdown buttons

## [1.0.0] - 2021-04-15

This release includes all changes from 1.0.0 pre-releases ([1.0.0-pre.1](#100-pre1---2021-04-09), [1.0.0-pre.2](#100-pre2---2021-04-13)), plus:
Expand Down
3 changes: 1 addition & 2 deletions Editor/Build/UI/UnityBuildGUIUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,9 @@ public static void DropdownHeader(string content, ref bool showDropdown, bool no
if (!noColor)
GUI.backgroundColor = instance._mainHeaderColor;

if (GUILayout.Button(content, dropdownHeaderStyle, options))
if (EditorGUILayout.DropdownButton(new GUIContent(content), FocusType.Keyboard, dropdownHeaderStyle, options))
{
showDropdown = !showDropdown;
GUIUtility.keyboardControl = 0;
}

if (!noColor)
Expand Down

0 comments on commit a21505c

Please sign in to comment.