Tanoda
pb_FullInspectorButton.cs
Go to the documentation of this file.
1using UnityEngine;
2using UnityEngine.UI;
3using System.Collections.Generic;
4using GILES.Interface;
5
6namespace GILES
7{
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;
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}
UnityEngine.Color Color
Definition: TestScript.cs:32
static GameObject activeGameObject
Definition: pb_Selection.cs:82
Definition: Macro.cs:12
static string T(string key)
Definition: Macro.cs:19