test
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine.InputSystem.Layouts;
|
||||
|
||||
namespace UnityEngine.InputSystem.Editor
|
||||
{
|
||||
internal class DefaultInputControlPickerLayout : IInputControlPickerLayout
|
||||
{
|
||||
public void AddControlItem(InputControlPickerDropdown dropdown, DeviceDropdownItem parent,
|
||||
ControlDropdownItem parentControl,
|
||||
InputControlLayout.ControlItem control, string device, string usage, bool searchable)
|
||||
{
|
||||
dropdown.AddControlItem(this, parent, parentControl, control, device, usage, searchable);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // UNITY_EDITOR
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7717bf968da90024b9c047ba1a3394ec
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,36 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine.InputSystem.Layouts;
|
||||
using UnityEngine.InputSystem.Utilities;
|
||||
|
||||
namespace UnityEngine.InputSystem.Editor
|
||||
{
|
||||
internal class TouchscreenControlPickerLayout : IInputControlPickerLayout
|
||||
{
|
||||
public void AddControlItem(InputControlPickerDropdown dropdown, DeviceDropdownItem parent, ControlDropdownItem parentControl,
|
||||
InputControlLayout.ControlItem control, string device, string usage, bool searchable)
|
||||
{
|
||||
// for the Press control, show two variants, one for single touch presses, and another for multi-touch presses
|
||||
if (control.displayName == "Press")
|
||||
{
|
||||
dropdown.AddControlItem(this, parent, parentControl, new InputControlLayout.ControlItem
|
||||
{
|
||||
name = new InternedString("Press"),
|
||||
displayName = new InternedString("Press (Single touch)"),
|
||||
layout = control.layout
|
||||
}, device, usage, searchable);
|
||||
|
||||
dropdown.AddControlItem(this, parent, parentControl, new InputControlLayout.ControlItem
|
||||
{
|
||||
name = new InternedString("Press"),
|
||||
displayName = new InternedString("Press (Multi-touch)"),
|
||||
layout = control.layout
|
||||
}, device, usage, searchable, "touch*/Press");
|
||||
}
|
||||
else
|
||||
{
|
||||
dropdown.AddControlItem(this, parent, parentControl, control, device, usage, searchable);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // UNITY_EDITOR
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 224236193350c244abab484f4514df16
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user