AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
InteractiveToggleButton.cs
Go to the documentation of this file.
1
// Copyright (c) Microsoft Corporation. All rights reserved.
2
// Licensed under the MIT License. See LICENSE in the project root for license information.
3
4
using
UnityEngine
;
5
using
System
.Collections;
6
using
UnityEngine
.Events;
7
using
HoloToolkit
.
Unity
.
InputModule
;
8
9
namespace
HoloToolkit
.Examples.InteractiveElements
10
{
18
public
class
InteractiveToggleButton
:
InteractiveToggle
19
{
20
21
public
UnityEvent
OnGazeEnterEvents
;
22
public
UnityEvent
OnGazeLeaveEvents
;
23
public
UnityEvent
OnDownEvents
;
24
public
UnityEvent
OnUpEvents
;
25
29
public
override
void
OnFocusEnter
()
30
{
31
base.OnFocusEnter();
32
33
OnGazeEnterEvents.Invoke();
34
}
35
39
public
override
void
OnFocusExit
()
40
{
41
base.OnFocusExit();
42
OnGazeLeaveEvents.Invoke();
43
}
44
48
public
override
void
OnInputDown
(
InputEventData
eventData)
49
{
50
base.OnInputDown(eventData);
51
52
OnDownEvents.Invoke();
53
}
54
58
public
override
void
OnInputUp
(
InputEventData
eventData)
59
{
60
bool
ignoreRelease = mCheckRollOff;
61
base.OnInputUp(eventData);
62
if
(!ignoreRelease)
63
{
64
OnUpEvents.Invoke();
65
}
66
}
67
}
68
}
HoloToolkit.Unity.InputModule
Definition:
AnimatedCursor.cs:7
HoloToolkit.Examples.InteractiveElements.InteractiveToggleButton.OnGazeEnterEvents
UnityEvent OnGazeEnterEvents
Definition:
InteractiveToggleButton.cs:21
HoloToolkit.Examples.InteractiveElements.InteractiveToggleButton.OnUpEvents
UnityEvent OnUpEvents
Definition:
InteractiveToggleButton.cs:24
HoloToolkit.Examples.InteractiveElements.InteractiveToggleButton.OnGazeLeaveEvents
UnityEvent OnGazeLeaveEvents
Definition:
InteractiveToggleButton.cs:22
System
HoloToolkit.Examples.InteractiveElements.InteractiveToggleButton.OnInputDown
override void OnInputDown(InputEventData eventData)
The user is initiating a tap or hold
Definition:
InteractiveToggleButton.cs:48
HoloToolkit.Examples.InteractiveElements.InteractiveToggleButton.OnDownEvents
UnityEvent OnDownEvents
Definition:
InteractiveToggleButton.cs:23
HoloToolkit.Examples.InteractiveElements.InteractiveToggleButton.OnInputUp
override void OnInputUp(InputEventData eventData)
All tab, hold, and gesture events are completed
Definition:
InteractiveToggleButton.cs:58
HoloToolkit.Examples.InteractiveElements.InteractiveToggleButton.OnFocusExit
override void OnFocusExit()
The gameObject no longer has gaze
Definition:
InteractiveToggleButton.cs:39
HoloToolkit.Examples.InteractiveElements.InteractiveToggleButton
InteractiveToggleButton expands InteractiveToggle to expose a gaze, down and up state events in the i...
Definition:
InteractiveToggleButton.cs:18
HoloToolkit.Examples.InteractiveElements.InteractiveToggle
InteractiveToggle expands Interactive to expose selection or toggle states.
Definition:
InteractiveToggle.cs:20
HoloToolkit
HoloToolkit.Examples.InteractiveElements.InteractiveToggleButton.OnFocusEnter
override void OnFocusEnter()
The gameObject received gaze
Definition:
InteractiveToggleButton.cs:29
HoloToolkit.Unity.InputModule.InputEventData
Describes an input event that has a source id and a press kind.
Definition:
InputEventData.cs:11
UnityEngine
HoloToolkit.Unity
Assets
HoloToolkit-Examples
UX
Scripts
InteractiveToggleButton.cs
Generated by
1.8.12