Tanoda
pb_PanelToggle.cs
Go to the documentation of this file.
1
using
UnityEngine
;
2
using
UnityEngine
.
UI
;
3
using
System.Collections;
4
5
namespace
GILES.Interface
6
{
10
public
class
pb_PanelToggle
:
pb_ToolbarButton
11
{
13
public
GameObject
panel
;
14
15
private
Color
onColor =
new
Color
(1f, .68f, 55f/255f, 1f),
16
offColor =
new
Color
(.26f, .26f, .26f, 1f);
17
18
protected
override
void
Start
()
19
{
20
base.Start();
21
22
onColor =
selectable
.colors.normalColor;
23
offColor =
selectable
.colors.disabledColor;
24
}
25
26
public
void
DoToggle
()
27
{
28
panel
.SetActive(!
panel
.activeInHierarchy);
29
30
ColorBlock block =
selectable
.colors;
31
block.normalColor =
panel
.activeInHierarchy ? onColor : offColor;
32
selectable
.colors = block;
33
}
34
}
35
}
Color
UnityEngine.Color Color
Definition:
TestScript.cs:32
GILES.Interface.pb_PanelToggle
Definition:
pb_PanelToggle.cs:11
GILES.Interface.pb_PanelToggle.Start
override void Start()
Definition:
pb_PanelToggle.cs:18
GILES.Interface.pb_PanelToggle.panel
GameObject panel
The panel to enable / disable with this toggle.
Definition:
pb_PanelToggle.cs:13
GILES.Interface.pb_PanelToggle.DoToggle
void DoToggle()
Definition:
pb_PanelToggle.cs:26
GILES.pb_ToolbarButton
Definition:
pb_ToolbarButton.cs:13
GILES.pb_ToolbarButton.selectable
Selectable selectable
Definition:
pb_ToolbarButton.cs:14
GILES.Interface
Definition:
pb_AutoStageItemEditor.cs:9
UnityEngine.UI
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
GILES
Code
Scripts
GUI
pb_PanelToggle.cs
Generated by
1.9.3