File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed
Packages/com.unity.inputsystem/InputSystem/Editor/ControlPicker Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 55
66namespace 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 ,
You can’t perform that action at this time.
0 commit comments