Tanoda
LeapInputModuleEditor.cs
Go to the documentation of this file.
1
/******************************************************************************
2
* Copyright (C) Ultraleap, Inc. 2011-2020. *
3
* *
4
* Use subject to the terms of the Apache License 2.0 available at *
5
* http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6
* between Ultraleap and you, your company or other organization. *
7
******************************************************************************/
8
9
using
UnityEditor
;
10
11
namespace
Leap.Unity.InputModule
{
12
[CustomEditor(typeof(LeapInputModule))]
13
public
class
LeapInputModuleEditor
:
CustomEditorBase
<LeapInputModule> {
14
protected
override
void
OnEnable
() {
15
base.OnEnable();
16
17
specifyConditionalDrawing
(() =>
target
.InteractionMode ==
LeapInputModule
.
InteractionCapability
.Hybrid ||
target
.InteractionMode ==
LeapInputModule
.
InteractionCapability
.Projective,
18
"PinchingThreshold"
,
19
"EnvironmentPointer"
,
20
"environmentPinch"
,
21
"PointerPinchScale"
,
22
"LeftHandDetector"
,
23
"RightHandDetector"
,
24
"HoveringColor"
);
25
26
specifyConditionalDrawing
(() =>
target
.PointerSprite !=
null
,
27
"PointerMaterial"
,
28
"StandardColor"
,
29
"HoveringColor"
,
30
"TriggeringColor"
,
31
"TriggerMissedColor"
);
32
33
specifyConditionalDrawing
(() =>
target
.InteractionMode ==
LeapInputModule
.
InteractionCapability
.Hybrid ||
target
.InteractionMode ==
LeapInputModule
.
InteractionCapability
.Tactile,
34
"TactilePadding"
);
35
36
specifyConditionalDrawing
(() =>
target
.InteractionMode ==
LeapInputModule
.
InteractionCapability
.Hybrid,
37
"ProjectiveToTactileTransitionDistance"
,
38
"RetractUI"
);
39
40
specifyConditionalDrawing
(() =>
target
.InnerPointer,
41
"InnerPointerOpacityScalar"
);
42
43
specifyConditionalDrawing
(() =>
target
.ShowAdvancedOptions,
44
"InteractionMode"
,
45
"OverrideScrollViewClicks"
,
46
"InnerPointer"
,
47
"InnerPointerOpacityScalar"
,
48
"DrawDebug"
,
49
"TriggerHoverOnElementSwitch"
,
50
"BeginHoverSound"
,
51
"EndHoverSound"
,
52
"BeginTriggerSound"
,
53
"EndTriggerSound"
,
54
"BeginMissedSound"
,
55
"EndMissedSound"
,
56
"DragLoopSound"
,
57
"onClickDown"
,
58
"onClickUp"
,
59
"onHover"
,
60
"whileClickHeld"
,
61
"ProjectiveToTactileTransitionDistance"
,
62
"PinchingThreshold"
,
63
"RetractUI"
,
64
"TactilePadding"
,
65
"EnvironmentPointer"
,
66
"perFingerPointer"
,
67
"ShowExperimentalOptions"
,
68
"PointerDistanceScale"
,
69
"PointerPinchScale"
,
70
"environmentPinch"
,
71
"MovingReferenceFrame"
);
72
73
specifyConditionalDrawing
(() =>
target
.ShowExperimentalOptions,
74
"InteractionMode"
,
75
"PointerDistanceScale"
,
76
"PointerPinchScale"
,
77
"ProjectiveToTactileTransitionDistance"
,
78
"PinchingThreshold"
,
79
"InnerPointer"
,
80
"InnerPointerOpacityScalar"
,
81
"OverrideScrollViewClicks"
,
82
"DrawDebug"
,
83
"TriggerHoverOnElementSwitch"
,
84
"perFingerPointer"
,
85
"RetractUI"
,
86
"EnvironmentPointer"
,
87
"environmentPinch"
,
88
"MovingReferenceFrame"
);
89
90
specifyConditionalDrawing
(() =>
target
.EnvironmentPointer,
91
"environmentPinch"
);
92
}
93
}
94
}
Leap.Unity.CustomEditorBase
Definition:
CustomEditorBase.cs:17
Leap.Unity.CustomEditorBase< LeapInputModule >::specifyConditionalDrawing
void specifyConditionalDrawing(string conditionalName, params string[] dependantProperties)
Specify a list of properties that should only be displayed if the conditional property has a value of...
Definition:
CustomEditorBase.cs:112
Leap.Unity.CustomEditorBase< LeapInputModule >::target
new T target
Definition:
CustomEditorBase.cs:18
Leap.Unity.InputModule.LeapInputModuleEditor
Definition:
LeapInputModuleEditor.cs:13
Leap.Unity.InputModule.LeapInputModuleEditor.OnEnable
override void OnEnable()
Definition:
LeapInputModuleEditor.cs:14
Leap.Unity.InputModule.LeapInputModule
Definition:
LeapInputModule.cs:17
Leap.Unity.InputModule.LeapInputModule.InteractionCapability
InteractionCapability
Definition:
LeapInputModule.cs:115
Leap.Unity.InputModule
Definition:
CompressibleUIEditor.cs:13
UnityEditor
Definition:
BoxSliderEditor.cs:6
Source
Assets
Plugins
LeapMotion
Legacy
UIInput
Editor
LeapInputModuleEditor.cs
Generated by
1.9.3