Tanoda
pb_StageManagerButton.cs
Go to the documentation of this file.
1
using
System.Collections;
2
using
System.Collections.Generic;
3
using
GILES
;
4
using
UnityEngine
;
5
using
UnityEngine
.
UI
;
6
7
public
class
pb_StageManagerButton
:
pb_ToolbarButton
8
{
9
#if DANA
10
private
readonly
Color
onColor =
new
Color
(1f, 1f, 1f, 1f),
11
offColor =
new
Color
(1f, 1f, 1f, 0.2f);
12
#elif UNITY_WEBGL
13
14
private
readonly
Color
onColor =
new
Color
(57 / 255f, 190 / 255f, 187 / 255f, 1f),
15
offColor =
new
Color
(1f, 1f, 1f, 1f);
16
#else
17
private
readonly
Color
onColor =
new
Color
(0.2235294f, 0.6352941f, 0.8941177f, 1f),
18
offColor =
new
Color
(.0f, .0f, .0f, 1f);
19
#endif
20
21
public
CanvasGroup
window
;
22
public
bool
isOn
=
false
;
23
24
public
void
ToggleWindow
()
25
{
26
ColorBlock block =
selectable
.colors;
27
block.normalColor = !
isOn
? onColor : offColor;
28
selectable
.colors = block;
29
30
window
.alpha =
isOn
? 0 : 1;
31
window
.blocksRaycasts = !
isOn
;
32
window
.interactable = !
isOn
;
33
isOn
= !
isOn
;
34
window
.transform.SetAsLastSibling();
35
}
36
}
Color
UnityEngine.Color Color
Definition:
TestScript.cs:32
GILES.pb_ToolbarButton
Definition:
pb_ToolbarButton.cs:13
GILES.pb_ToolbarButton.selectable
Selectable selectable
Definition:
pb_ToolbarButton.cs:14
pb_StageManagerButton
Definition:
pb_StageManagerButton.cs:8
pb_StageManagerButton.window
CanvasGroup window
Definition:
pb_StageManagerButton.cs:21
pb_StageManagerButton.ToggleWindow
void ToggleWindow()
Definition:
pb_StageManagerButton.cs:24
pb_StageManagerButton.isOn
bool isOn
Definition:
pb_StageManagerButton.cs:22
GILES
Definition:
pb_CollectionUtil.cs:4
UnityEngine.UI
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
GILES
Code
Scripts
GUI
pb_StageManagerButton.cs
Generated by
1.9.3