Tanoda
pb_GUIStyleApplier.cs
Go to the documentation of this file.
1
using
UnityEngine
;
2
using
UnityEngine
.
UI
;
3
using
UnityEngine
.
EventSystems
;
4
using
System.Collections;
5
6
namespace
GILES.Interface
7
{
11
public
class
pb_GUIStyleApplier
: MonoBehaviour
12
{
13
public
bool
ignoreStyle
;
14
public
pb_GUIStyle
style
;
15
16
void
Awake()
17
{
18
if
(!
ignoreStyle
)
19
ApplyStyle
();
20
}
21
22
public
void
ApplyStyle
()
23
{
24
if
(
style
==
null
||
ignoreStyle
)
25
return
;
26
27
ApplyRecursive(gameObject);
28
}
29
30
private
void
ApplyRecursive(GameObject go)
31
{
32
foreach
(Graphic graphic
in
go.GetComponents<Graphic>())
33
style
.
Apply
(graphic);
34
35
foreach
(Selectable selectable
in
go.GetComponents<Selectable>())
36
style
.
Apply
(selectable);
37
38
foreach
(Transform t
in
go.transform)
39
{
40
if
(t.gameObject.GetComponent<
pb_GUIStyleApplier
>() !=
null
)
41
continue
;
42
43
ApplyRecursive(t.gameObject);
44
}
45
}
46
}
47
}
GILES.Interface.pb_GUIStyleApplier
Definition:
pb_GUIStyleApplier.cs:12
GILES.Interface.pb_GUIStyleApplier.ApplyStyle
void ApplyStyle()
Definition:
pb_GUIStyleApplier.cs:22
GILES.Interface.pb_GUIStyleApplier.style
pb_GUIStyle style
Definition:
pb_GUIStyleApplier.cs:14
GILES.Interface.pb_GUIStyleApplier.ignoreStyle
bool ignoreStyle
Definition:
pb_GUIStyleApplier.cs:13
GILES.Interface.pb_GUIStyle
Definition:
pb_GUIStyle.cs:13
GILES.Interface.pb_GUIStyle.Apply
virtual void Apply(Graphic element)
Definition:
pb_GUIStyle.cs:78
GILES.Interface
Definition:
pb_AutoStageItemEditor.cs:9
UnityEngine.EventSystems
Definition:
AimerInputModule.cs:5
UnityEngine.UI
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
GILES
Code
Scripts
GUI
pb_GUIStyleApplier.cs
Generated by
1.9.3