Tanoda
ToggleToggler.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
UnityEngine
;
10
using
UnityEngine
.
UI
;
11
using
System.Collections;
12
13
namespace
Leap.Unity.InputModule
{
14
public
class
ToggleToggler
: MonoBehaviour {
15
public
Text
text
;
16
public
UnityEngine
.
UI
.Image
image
;
17
public
Color
OnColor
;
18
public
Color
OffColor
;
19
20
public
void
SetToggle
(Toggle toggle) {
21
if
(toggle.isOn) {
22
text
.text =
"On"
;
23
text
.color =
Color
.white;
24
image
.color =
OnColor
;
25
}
else
{
26
text
.text =
"Off"
;
27
text
.color =
new
Color
(0.3f, 0.3f, 0.3f);
28
image
.color =
OffColor
;
29
}
30
}
31
}
32
}
Color
UnityEngine.Color Color
Definition:
TestScript.cs:32
Leap.Unity.InputModule.ToggleToggler
Definition:
ToggleToggler.cs:14
Leap.Unity.InputModule.ToggleToggler.OnColor
Color OnColor
Definition:
ToggleToggler.cs:17
Leap.Unity.InputModule.ToggleToggler.text
Text text
Definition:
ToggleToggler.cs:15
Leap.Unity.InputModule.ToggleToggler.SetToggle
void SetToggle(Toggle toggle)
Definition:
ToggleToggler.cs:20
Leap.Unity.InputModule.ToggleToggler.image
UnityEngine.UI.Image image
Definition:
ToggleToggler.cs:16
Leap.Unity.InputModule.ToggleToggler.OffColor
Color OffColor
Definition:
ToggleToggler.cs:18
Leap.Unity.InputModule
Definition:
CompressibleUIEditor.cs:13
UnityEngine.UI
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Plugins
LeapMotion
Legacy
UIInput
Scripts
Utilities
ToggleToggler.cs
Generated by
1.9.3