Elin Decompiled Documentation
EA 23.102 Nightly
Loading...
Searching...
No Matches
SelectedColorController.cs
Go to the documentation of this file.
1
using
Empyrean.Utils
;
2
using
UnityEngine;
3
using
UnityEngine.UI;
4
5
public
class
SelectedColorController
: MonoBehaviour
6
{
7
[SerializeField]
8
private
Image
colorImage
;
9
10
[SerializeField]
11
private
Color
rgba
;
12
13
[SerializeField]
14
private
HSVColor
hsv
;
15
16
[SerializeField]
17
private
Slider
slider
;
18
19
public
Color
RGBA
20
{
21
get
22
{
23
return
rgba
;
24
}
25
set
26
{
27
Select
(value);
28
}
29
}
30
31
public
HSVColor
HSV
32
{
33
get
34
{
35
return
hsv
;
36
}
37
set
38
{
39
Select
(value);
40
}
41
}
42
43
public
void
Select
(
Color
rgba
)
44
{
45
this.rgba =
rgba
;
46
hsv
=
Colorist
.
RGBtoHSV
(
rgba
);
47
SetupComponents
(
rgba
);
48
}
49
50
public
void
Select
(
HSVColor
hsv
)
51
{
52
rgba
=
Colorist
.
HSVtoRGB
(
hsv
);
53
this.hsv =
hsv
;
54
SetupComponents
(
rgba
);
55
}
56
57
private
void
SetupComponents
(
Color
rgba
)
58
{
59
slider.value =
rgba
.a;
60
colorImage.color =
new
Color
(
rgba
.r,
rgba
.g,
rgba
.b, 1f);
61
}
62
}
FOWType.Color
@ Color
Empyrean.Utils.Colorist
Definition:
Colorist.cs:7
Empyrean.Utils.Colorist.HSVtoRGB
static Color HSVtoRGB(HSVColor hsv)
Definition:
Colorist.cs:107
Empyrean.Utils.Colorist.RGBtoHSV
static HSVColor RGBtoHSV(Color color)
Definition:
Colorist.cs:130
SelectedColorController
Definition:
SelectedColorController.cs:6
SelectedColorController.HSV
HSVColor HSV
Definition:
SelectedColorController.cs:32
SelectedColorController.rgba
Color rgba
Definition:
SelectedColorController.cs:11
SelectedColorController.RGBA
Color RGBA
Definition:
SelectedColorController.cs:20
SelectedColorController.colorImage
Image colorImage
Definition:
SelectedColorController.cs:8
SelectedColorController.hsv
HSVColor hsv
Definition:
SelectedColorController.cs:14
SelectedColorController.SetupComponents
void SetupComponents(Color rgba)
Definition:
SelectedColorController.cs:57
SelectedColorController.slider
Slider slider
Definition:
SelectedColorController.cs:17
SelectedColorController.Select
void Select(Color rgba)
Definition:
SelectedColorController.cs:43
SelectedColorController.Select
void Select(HSVColor hsv)
Definition:
SelectedColorController.cs:50
Empyrean.Utils
Definition:
Colorist.cs:4
HSVColor
Definition:
HSVColor.cs:2
Elin
Plugins.UI
SelectedColorController.cs
Generated by
1.9.6