Firstborn/Library/PackageCache/com.unity.inputsystem@1.5.1/InputSystem/Editor/ControlPicker/InputControlPicker.cs
Schaken-Mods 9092858a58 updated to the latest editor
I updated everything to the latest Unity Editor. Also realized I had the wrong shaders on my hairs, those are fixed and the hairs look MUCH better!
2023-05-07 17:43:11 -05:00

42 lines
1.0 KiB
C#

#if UNITY_EDITOR || PACKAGE_DOCS_GENERATION
using System;
////REVIEW: should this be a PopupWindowContent?
namespace UnityEngine.InputSystem.Editor
{
/// <summary>
/// A popup that allows picking input controls graphically.
/// </summary>
public sealed class InputControlPicker : IDisposable
{
public InputControlPicker(Mode mode, Action<string> onPick, InputControlPickerState state)
{
m_State = state ?? new InputControlPickerState();
m_Dropdown = new InputControlPickerDropdown(state, onPick, mode: mode);
}
public void Show(Rect rect)
{
m_Dropdown.Show(rect);
}
public void Dispose()
{
m_Dropdown?.Dispose();
}
public InputControlPickerState state => m_State;
private readonly InputControlPickerDropdown m_Dropdown;
private readonly InputControlPickerState m_State;
public enum Mode
{
PickControl,
PickDevice,
}
}
}
#endif // UNITY_EDITOR