-
Notifications
You must be signed in to change notification settings - Fork 8
/
Textures.cs
171 lines (158 loc) · 5.1 KB
/
Textures.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
using UnityEngine;
namespace UmbraMenu
{
public static class Textures
{
private static Texture2D onTexture, onPressTexture, offTexture, offPressTexture, highlightTexture, highlightPressTexture, cornerTexture, backTexture, btnTexture, btnPressTexture, btnTextureLabel;
private static Texture2D NewTexture2D { get { return new Texture2D(1, 1); } }
#region Textures
public static Texture2D BtnTexture
{
get
{
if (btnTexture == null)
{
btnTexture = NewTexture2D;
btnTexture.SetPixel(0, 0, new Color32(85, 85, 85, 240));
btnTexture.Apply();
}
return btnTexture;
}
}
public static Texture2D BtnTextureLabel
{
get
{
if (BtnTextureLabel == null)
{
btnTextureLabel = NewTexture2D;
btnTextureLabel.SetPixel(0, 0, new Color32(255, 0, 0, 255));
btnTextureLabel.Apply();
}
return BtnTextureLabel;
}
}
public static Texture2D BtnPressTexture
{
get
{
if (btnPressTexture == null)
{
btnPressTexture = NewTexture2D;
btnPressTexture.SetPixel(0, 0, new Color32(79, 79, 79, 240));
btnPressTexture.Apply();
}
return btnPressTexture;
}
}
public static Texture2D OnPressTexture
{
get
{
if (onPressTexture == null)
{
onPressTexture = NewTexture2D;
onPressTexture.SetPixel(0, 0, new Color32(30, 30, 30, 240));
onPressTexture.Apply();
}
return onPressTexture;
}
}
public static Texture2D OnTexture
{
get
{
if (onTexture == null)
{
onTexture = NewTexture2D;
onTexture.SetPixel(0, 0, new Color32(47, 47, 47, 240));
onTexture.Apply();
}
return onTexture;
}
}
public static Texture2D OffPressTexture
{
get
{
if (offPressTexture == null)
{
offPressTexture = NewTexture2D;
offPressTexture.SetPixel(0, 0, new Color32(79, 79, 79, 240));
offPressTexture.Apply();
}
return offPressTexture;
}
}
public static Texture2D OffTexture
{
get
{
if (offTexture == null)
{
offTexture = NewTexture2D;
offTexture.SetPixel(0, 0, new Color32(85, 85, 85, 240));
// byte[] FileData = File.ReadAllBytes(Directory.GetCurrentDirectory() + "/BepInEx/plugins/UmbraRoR/Resources/Images/OffStyle.png");
// offtexture.LoadImage(FileData);
offTexture.Apply();
}
return offTexture;
}
}
public static Texture2D BackTexture
{
get
{
if (backTexture == null)
{
backTexture = NewTexture2D;
//backtexture.SetPixel(0, 0, new Color32(0, 0, 0, 158));
backTexture.SetPixel(0, 0, new Color32(0, 0, 0, 120));
backTexture.Apply();
}
return backTexture;
}
}
public static Texture2D CornerTexture
{
get
{
if (cornerTexture == null)
{
cornerTexture = NewTexture2D;
// ToHtmlStringRGBA new Color(33, 150, 243, 1)
cornerTexture.SetPixel(0, 0, new Color32(42, 42, 42, 0));
cornerTexture.Apply();
}
return cornerTexture;
}
}
public static Texture2D HighlightTexture
{
get
{
if (highlightTexture == null)
{
highlightTexture = NewTexture2D;
highlightTexture.SetPixel(0, 0, new Color32(0, 0, 0, 0));
highlightTexture.Apply();
}
return highlightTexture;
}
}
public static Texture2D HighlightPressTexture
{
get
{
if (highlightPressTexture == null)
{
highlightPressTexture = NewTexture2D;
highlightPressTexture.SetPixel(0, 0, new Color32(0, 0, 0, 0));
highlightPressTexture.Apply();
}
return highlightPressTexture;
}
}
#endregion Textures
}
}