Skip to content

Commit a2063c5

Browse files
committed
restoring public api
1 parent 496fab1 commit a2063c5

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

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

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,32 @@
55

66
namespace UnityEngine.InputSystem.Editor
77
{
8-
public sealed class InputControlPicker
8+
/// <summary>
9+
/// A popup that allows picking input controls graphically.
10+
/// </summary>
11+
public sealed class InputControlPicker : IDisposable
912
{
13+
public InputControlPicker(Mode mode, Action<string> onPick, InputControlPickerState state)
14+
{
15+
m_State = state ?? new InputControlPickerState();
16+
m_Dropdown = new InputControlPickerDropdown(state, onPick, mode: mode);
17+
}
18+
19+
public void Show(Rect rect)
20+
{
21+
m_Dropdown.Show(rect);
22+
}
23+
24+
public void Dispose()
25+
{
26+
m_Dropdown?.Dispose();
27+
}
28+
29+
public InputControlPickerState state => m_State;
30+
31+
private readonly InputControlPickerDropdown m_Dropdown;
32+
private readonly InputControlPickerState m_State;
33+
1034
public enum Mode
1135
{
1236
PickControl,

0 commit comments

Comments
 (0)