Skip to content

Commit 16746d1

Browse files
author
Rene Damm
authored
FIX: Foldouts not expanding with Unity 2019.3 (case 1213781, #1057).
1 parent f9b1628 commit 16746d1

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ however, it has to be formatted properly to pass verification tests.
4747
- The list of device requirements for a control scheme in the action editor no longer displays devices with their internal layout name rather than their external display name.
4848
- `StackOverflowException` when `Invoke Unity Events` is selected in `PlayerInput` and it cannot find an action (#1033).
4949
- `HoldInteraction` now stays performed after timer has expired and cancels only on release of the control ([case 1195498](https://issuetracker.unity3d.com/issues/inputsystem-inputaction-dot-readvalue-returns-0-when-a-hold-action-is-performed-for-hold-time-amount-of-time)).
50+
- Foldouts in the various action UIs now properly toggle their expansion state when clicked in Unity 2019.3+ ([case 1213781](https://issuetracker.unity3d.com/issues/input-system-package-playerinput-component-events-menu-doesnt-expand-when-clicked-directly-on-the-arrow-icon)).
5051

5152
### Added
5253

Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/InputActionTreeView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ private bool DrawFoldout(Rect position, bool expandedState, GUIStyle style)
11671167
var indent = (int)(position.x / kFoldoutWidth);
11681168
position.x = foldoutOffset + (indent + 1) * kColorTagWidth + 2;
11691169
position.width = kFoldoutWidth;
1170-
return EditorGUI.Foldout(position, expandedState, GUIContent.none, style);
1170+
return EditorGUI.Foldout(position, expandedState, GUIContent.none, true, style);
11711171
}
11721172

11731173
protected override void RowGUI(RowGUIArgs args)

Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/NameAndParameterListView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public void OnGUI()
143143
var editableParams = m_EditableParametersForEachListItem[i];
144144
EditorGUILayout.BeginHorizontal();
145145
if (editableParams.hasUIToShow)
146-
editableParams.visible = EditorGUILayout.Foldout(editableParams.visible, editableParams.name, Styles.s_FoldoutStyle);
146+
editableParams.visible = EditorGUILayout.Foldout(editableParams.visible, editableParams.name, true, Styles.s_FoldoutStyle);
147147
else
148148
{
149149
GUILayout.Space(16);

Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/PropertiesViewBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private static bool DrawFoldout(GUIContent content, bool folded, GUIContent addB
8282
EditorGUI.LabelField(bgRect, GUIContent.none, Styles.s_FoldoutBackgroundStyle);
8383
var foldoutRect = bgRect;
8484
foldoutRect.xMax -= k_PopupSize;
85-
var retval = EditorGUI.Foldout(foldoutRect, folded, content, Styles.s_FoldoutStyle);
85+
var retval = EditorGUI.Foldout(foldoutRect, folded, content, true, Styles.s_FoldoutStyle);
8686
if (addButton != null)
8787
{
8888
var popupRect = bgRect;

Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputEditor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public override void OnInspectorGUI()
161161
break;
162162

163163
case PlayerNotifications.InvokeUnityEvents:
164-
m_EventsGroupUnfolded = EditorGUILayout.Foldout(m_EventsGroupUnfolded, m_EventsGroupText);
164+
m_EventsGroupUnfolded = EditorGUILayout.Foldout(m_EventsGroupUnfolded, m_EventsGroupText, toggleOnLabelClick: true);
165165
if (m_EventsGroupUnfolded)
166166
{
167167
// Action events. Group by action map.
@@ -173,7 +173,7 @@ public override void OnInspectorGUI()
173173
for (var n = 0; n < m_NumActionMaps; ++n)
174174
{
175175
m_ActionMapEventsUnfolded[n] = EditorGUILayout.Foldout(m_ActionMapEventsUnfolded[n],
176-
m_ActionMapNames[n]);
176+
m_ActionMapNames[n], toggleOnLabelClick: true);
177177
using (new EditorGUI.IndentLevelScope())
178178
{
179179
if (m_ActionMapEventsUnfolded[n])

Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputManagerEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private void DoNotificationSectionUI()
6666
break;
6767

6868
case PlayerNotifications.InvokeUnityEvents:
69-
m_EventsExpanded = EditorGUILayout.Foldout(m_EventsExpanded, m_EventsLabel);
69+
m_EventsExpanded = EditorGUILayout.Foldout(m_EventsExpanded, m_EventsLabel, toggleOnLabelClick: true);
7070
if (m_EventsExpanded)
7171
{
7272
var playerJoinedEventProperty = serializedObject.FindProperty("m_PlayerJoinedEvent");

0 commit comments

Comments
 (0)