Skip to content

Commit 3b1950b

Browse files
author
Rene Damm
authored
FIX: Multiple minor editor UI glitches (#887).
1 parent 1c495d6 commit 3b1950b

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ however, it has to be formatted properly to pass verification tests.
1313

1414
- Fixed a bug where the Input Settings Window might throw exceptions after assembly reload.
1515
- Correctly implemented `IsPointerOverGameObject` method for `InputSystemUIInputModule`.
16+
- Selecting a layout in the input debugger no longer selects its first child item, too.
1617

1718
### Actions
1819

1920
- Fixed a bug where multiple composite bindings for the same controls but on different action maps would throw exceptions.
21+
- The text on the "Listen" button is no longer clipped off on 2019.3.
22+
- Controls bound to actions through composites no longer show up as duplicates in the input debugger.
2023

2124
### Changed
2225

@@ -26,7 +29,7 @@ however, it has to be formatted properly to pass verification tests.
2629

2730
### Fixed
2831

29-
-Will now close Input Action Asset Editor windows from previous sessions when the corresponding action was deleted.
32+
- Will now close Input Action Asset Editor windows from previous sessions when the corresponding action was deleted.
3033
- Fixed an issue where Stick Controls could not be created in Players built with medium or high code stripping level enabled.
3134
- Fixed incorrect default state for axes on some controllers.
3235

Packages/com.unity.inputsystem/InputSystem/Editor/ControlPicker/InputControlPickerDropdown.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,12 +511,12 @@ internal override string DrawSearchFieldControl(string searchString)
511511
// When picking controls, have a "Listen" button that allows listening for input.
512512
if (m_Owner.m_Mode == InputControlPicker.Mode.PickControl)
513513
{
514-
using (new EditorGUILayout.VerticalScope(GUILayout.MaxWidth(42)))
514+
using (new EditorGUILayout.VerticalScope(GUILayout.MaxWidth(50)))
515515
{
516516
GUILayout.Space(4);
517517
var isListeningOld = m_Owner.isListening;
518518
var isListeningNew = GUILayout.Toggle(isListeningOld, "Listen",
519-
EditorStyles.miniButton, GUILayout.MaxWidth(45));
519+
EditorStyles.miniButton, GUILayout.MaxWidth(50));
520520

521521
if (isListeningOld != isListeningNew)
522522
{

Packages/com.unity.inputsystem/InputSystem/Editor/Debugger/InputDebuggerWindow.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ private TreeViewItem AddControlLayoutItem(InputControlLayout layout, TreeViewIte
695695
{
696696
parent = parent,
697697
depth = parent.depth + 1,
698-
id = ++id,
698+
id = id++,
699699
displayName = layout.displayName ?? layout.name,
700700
layoutName = layout.name,
701701
};
@@ -880,6 +880,8 @@ private unsafe void AddActionItem(TreeViewItem parent, InputAction action, ref i
880880
ref var bindingState = ref state.bindingStates[i];
881881
if (bindingState.actionIndex != actionIndex)
882882
continue;
883+
if (bindingState.isComposite)
884+
continue;
883885

884886
var binding = state.GetBinding(i);
885887
var controlCount = bindingState.controlCount;

Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/XboxGamepadMacOS.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using UnityEngine.InputSystem.LowLevel;
55
using UnityEngine.InputSystem.XInput.LowLevel;
66
using UnityEngine.InputSystem.Utilities;
7+
using UnityEngine.Scripting;
78

89
namespace UnityEngine.InputSystem.XInput.LowLevel
910
{
@@ -169,10 +170,7 @@ public enum Button
169170
[FieldOffset(14)]
170171
public uint buttons;
171172

172-
public FourCC format
173-
{
174-
get { return kFormat; }
175-
}
173+
public FourCC format => kFormat;
176174

177175
public XInputControllerWirelessOSXState WithButton(Button button)
178176
{
@@ -197,8 +195,6 @@ public XInputControllerWirelessOSXState WithDpad(byte value)
197195
}
198196
namespace UnityEngine.InputSystem.XInput
199197
{
200-
[InputControlLayout(stateType = typeof(XInputControllerOSXState), hideInUI = true)]
201-
[Scripting.Preserve]
202198
/// <summary>
203199
/// A wired Xbox Gamepad connected to a macOS computer.
204200
/// </summary>
@@ -207,12 +203,12 @@ namespace UnityEngine.InputSystem.XInput
207203
/// These controllers don't work on a mac out of the box, but require a driver like https://github.com/360Controller/
208204
/// to work.
209205
/// </remarks>
206+
[InputControlLayout(displayName = "Xbox Controller", stateType = typeof(XInputControllerOSXState), hideInUI = true)]
207+
[Preserve]
210208
public class XboxGamepadMacOS : XInputController
211209
{
212210
}
213211

214-
[InputControlLayout(stateType = typeof(XInputControllerWirelessOSXState), hideInUI = true)]
215-
[Scripting.Preserve]
216212
/// <summary>
217213
/// A wireless Xbox One Gamepad connected to a macOS computer.
218214
/// </summary>
@@ -222,6 +218,8 @@ public class XboxGamepadMacOS : XInputController
222218
/// with a proprietary Xbox wireless protocol, and cannot be used on a Mac.
223219
/// Unlike wired controllers, bluetooth-cabable Xbox One controllers do not need a custom driver to work on macOS.
224220
/// </remarks>
221+
[InputControlLayout(displayName = "Wireless Xbox Controller", stateType = typeof(XInputControllerWirelessOSXState), hideInUI = true)]
222+
[Preserve]
225223
public class XboxOneGampadMacOSWireless : XInputController
226224
{
227225
}

0 commit comments

Comments
 (0)