Tanoda
pb_FullInspectorButton.cs
Go to the documentation of this file.
1
using
UnityEngine
;
2
using
UnityEngine
.
UI
;
3
using
System.Collections.Generic;
4
using
GILES
.
Interface
;
5
6
namespace
GILES
7
{
8
public
class
pb_FullInspectorButton
:
pb_ToolbarButton
9
{
10
public
override
string
tooltip
{
get
{
return
Macro
.
T
(
"BTN_FULL_INSPECTOR"
); } }
11
12
//public pb_Inspector inspector;
13
14
private
Color
onColor =
new
Color
(1f, .68f, 55f/255f, 1f),
15
offColor =
new
Color
(.26f, .26f, .26f, 1f);
16
17
18
protected
override
void
Start
()
19
{
20
base.Start();
21
22
onColor =
selectable
.colors.normalColor;
23
offColor =
selectable
.colors.disabledColor;
24
UpdateColors();
25
}
26
27
public
void
DoToggle
()
28
{
29
pb_Inspector
.
instance
.showUnityComponents = !
pb_Inspector
.
instance
.showUnityComponents;
30
pb_Inspector
.
instance
.RebuildInspector(
pb_Selection
.
activeGameObject
);
31
UpdateColors();
32
}
33
34
void
UpdateColors()
35
{
36
ColorBlock block =
selectable
.colors;
37
block.normalColor =
pb_Inspector
.
instance
.showUnityComponents ? onColor : offColor;
38
selectable
.colors = block;
39
}
40
}
41
}
Color
UnityEngine.Color Color
Definition:
TestScript.cs:32
GILES.Interface.pb_Inspector
Definition:
pb_Inspector.cs:16
GILES.pb_FullInspectorButton
Definition:
pb_FullInspectorButton.cs:9
GILES.pb_FullInspectorButton.tooltip
override string tooltip
Definition:
pb_FullInspectorButton.cs:10
GILES.pb_FullInspectorButton.Start
override void Start()
Definition:
pb_FullInspectorButton.cs:18
GILES.pb_FullInspectorButton.DoToggle
void DoToggle()
Definition:
pb_FullInspectorButton.cs:27
GILES.pb_MonoBehaviourSingleton.instance
static T instance
Definition:
pb_MonoBehaviourSingleton.cs:28
GILES.pb_Selection
Definition:
pb_Selection.cs:13
GILES.pb_Selection.activeGameObject
static GameObject activeGameObject
Definition:
pb_Selection.cs:82
GILES.pb_ToolbarButton
Definition:
pb_ToolbarButton.cs:13
GILES.pb_ToolbarButton.selectable
Selectable selectable
Definition:
pb_ToolbarButton.cs:14
Macro
Definition:
Macro.cs:12
Macro.T
static string T(string key)
Definition:
Macro.cs:19
GILES.Interface
Definition:
pb_AutoStageItemEditor.cs:9
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
Toolbar
pb_FullInspectorButton.cs
Generated by
1.9.3