-
Notifications
You must be signed in to change notification settings - Fork 1
/
colorMenu.pde
168 lines (147 loc) · 4 KB
/
colorMenu.pde
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
class colorMenu {
float x;
float y;
float z;
float redA;
float orangeA;
float yellowA;
float greenA;
float tealA;
float blueA;
float purpleA;
float pinkA;
float whiteA;
colorMenu() {
this.x = -10;
this.y = -200;
this.z = 920;
this.redA = 210;
this.orangeA = 210;
this.yellowA = 210;
this.greenA = 210;
this.tealA = 210;
this.blueA = 210;
this.purpleA = 210;
this.pinkA = 210;
this.whiteA = 200;
}
void drawMenu() {
stroke(255, 255, 255, this.whiteA);
strokeWeight(150);
point(this.x, this.y, this.z);
}
void colorWheel() {
strokeWeight(80);
stroke(240, 0, 0, this.redA); // Red
point(this.x, this.y, this.z - 70);
stroke(255, 150, 0, this.orangeA); // Orange
point(this.x + 50, this.y, this.z - 50);
stroke(255, 235, 0, this.yellowA); // Yellow
point(this.x + 70, this.y, this.z);
stroke(130, 230, 0, this.greenA); // Green
point(this.x + 50, this.y, this.z + 50);
stroke(0, 240, 240, this.tealA); // Teal
point(this.x, this.y, this.z + 70);
stroke(70, 100, 255, this.blueA); // Blue
point(this.x - 50, this.y, this.z + 50);
stroke(140, 25, 255, this.purpleA); // Purple
point(this.x - 70, this.y, this.z);
stroke(255, 150, 200, this.pinkA); // Pink
point(this.x - 50, this.y, this.z - 50);
}
boolean inDrawMenuArea(float x, float y, float z) {
return (x >= (this.x - 300) && x <= (this.x + 300) &&
y >= (this.y - 1) && y <= (this.y + 25) &&
z >= (this.z - 300) && z <= (this.z + 300));
}
boolean inDrawMenu(float x, float y, float z) {
if (x >= (this.x - 30) && x <= (this.x + 30) && z >= (this.z - 30) && z <= (this.z + 30) && y < 0) {
this.whiteA = 240;
return true;
}
else {
this.whiteA = 200;
return false;
}
}
boolean inRed(float x, float y, float z) {
if (x >= (this.x - 15) && x <= (this.x + 15) && z >= (this.z - 80) && z <= (this.z - 40) && y < 0) {
this.redA = 255;
return true;
}
else {
this.redA = 210;
return false;
}
}
boolean inOrange(float x, float y, float z) {
if (x >= (this.x + 35) && x <= (this.x + 65) && z >= (this.z - 60) && z <= (this.z - 20) && y < 0) {
this.orangeA = 255;
return true;
}
else {
this.orangeA = 210;
return false;
}
}
boolean inYellow(float x, float y, float z) {
if (x >= (this.x + 45) && x <= (this.x + 85) && z >= (this.z - 20) && z <= (this.z + 20) && y < 0) {
this.yellowA = 255;
return true;
}
else {
this.yellowA = 210;
return false;
}
}
boolean inGreen(float x, float y, float z) {
if (x >= (this.x + 35) && x <= (this.x + 65) && z>= (this.z + 40) && z <= (this.z + 80) && y < 0) {
this.greenA = 255;
return true;
}
else {
this.greenA = 210;
return false;
}
}
boolean inTeal(float x, float y, float z) {
if (x >= (this.x - 15) && x <= (this.x + 15) && z >= (this.z + 60) && z <= (this.z + 100) && y < 0) {
this.tealA = 255;
return true;
}
else {
this.tealA = 210;
return false;
}
}
boolean inBlue(float x, float y, float z) {
if (x >= (this.x - 65) && x <= (this.x - 35) && z >= (this.z + 40) && z <= (this.z + 80) && y < 0) {
this.blueA = 255;
return true;
}
else {
this.blueA = 210;
return false;
}
}
boolean inPurple(float x, float y, float z) {
if (x >= (this.x - 85) && x <= (this.x - 55) && z >= (this.z - 20) && z <= (this.z + 20) && y < 0) {
this.purpleA = 255;
return true;
}
else {
this.purpleA = 210;
return false;
}
}
boolean inPink(float x, float y, float z) {
if (x >= (this.x - 65) && x <= (this.x - 35) && z >= (this.z - 60) && z <= (this.z - 20) && y < 0) {
this.pinkA = 255;
return true;
}
else {
this.pinkA = 210;
return false;
}
}
}