A game about forced loneliness, made by TACStudios
1#if UNITY_EDITOR
2using UnityEngine.InputSystem.Layouts;
3using UnityEngine.InputSystem.Utilities;
4
5namespace UnityEngine.InputSystem.Editor
6{
7 internal class TouchscreenControlPickerLayout : IInputControlPickerLayout
8 {
9 public void AddControlItem(InputControlPickerDropdown dropdown, DeviceDropdownItem parent, ControlDropdownItem parentControl,
10 InputControlLayout.ControlItem control, string device, string usage, bool searchable)
11 {
12 // for the Press control, show two variants, one for single touch presses, and another for multi-touch presses
13 if (control.displayName == "Press")
14 {
15 dropdown.AddControlItem(this, parent, parentControl, new InputControlLayout.ControlItem
16 {
17 name = new InternedString("Press"),
18 displayName = new InternedString("Press (Single touch)"),
19 layout = control.layout
20 }, device, usage, searchable);
21
22 dropdown.AddControlItem(this, parent, parentControl, new InputControlLayout.ControlItem
23 {
24 name = new InternedString("Press"),
25 displayName = new InternedString("Press (Multi-touch)"),
26 layout = control.layout
27 }, device, usage, searchable, "touch*/Press");
28 }
29 else
30 {
31 dropdown.AddControlItem(this, parent, parentControl, control, device, usage, searchable);
32 }
33 }
34 }
35}
36#endif // UNITY_EDITOR