-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCrossHair.pde
More file actions
36 lines (33 loc) · 740 Bytes
/
CrossHair.pde
File metadata and controls
36 lines (33 loc) · 740 Bytes
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
class CrossHair
{
PShape crosshair;
void drawCrossHair(boolean power)
{
if(power == true)
{
strokeWeight(2);
noFill();
crosshair = createShape();
crosshair.beginShape();
crosshair.vertex(5,10);
crosshair.vertex(5,5);
crosshair.vertex(105, 5);
crosshair.vertex(122.5,-10);
crosshair.vertex(140, 5);
crosshair.vertex(240, 5);
crosshair.vertex(240, 10);
crosshair.endShape();
pushMatrix();
translate(width/2, height/2);
shape(crosshair, -122.5, -10);
popMatrix();
}
else
{
textSize(25);
fill(0, 255, 0);
textAlign(CENTER, CENTER);
text("Standby..", width/2, height/2);
}
}
}