Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 27 lines (22 sloc) 0.531 kB
642e2b0 @mhenstell hud subclass
mhenstell authored
1 class Hud {
715a99f @mhenstell reconfigured the HUD littlebit
mhenstell authored
2
04ef49e @mhenstell fixed blinky HUD syndrome
mhenstell authored
3 int boxHeight = 155;
380675d @cibomahto Attempt at improving blinkiness, but it doesn't help much.
cibomahto authored
4 String hudText = new String("Dome Shit");
5
6 void setHudText(String newText) {
7 hudText = newText;
8 }
715a99f @mhenstell reconfigured the HUD littlebit
mhenstell authored
9
642e2b0 @mhenstell hud subclass
mhenstell authored
10 void draw() {
11 pCamera.beginHUD();
12 noLights();
04ef49e @mhenstell fixed blinky HUD syndrome
mhenstell authored
13 strokeWeight(0);
642e2b0 @mhenstell hud subclass
mhenstell authored
14 fill(255,255,255,200);
15 rect(10,10,width-20,30);
16 textFont(font);
17 fill(0,0,0);
18 textAlign(CENTER);
380675d @cibomahto Attempt at improving blinkiness, but it doesn't help much.
cibomahto authored
19 text(hudText, width/2-20, 32);
04ef49e @mhenstell fixed blinky HUD syndrome
mhenstell authored
20 fill(255,255,255,100);
715a99f @mhenstell reconfigured the HUD littlebit
mhenstell authored
21 rectMode(CORNER);
04ef49e @mhenstell fixed blinky HUD syndrome
mhenstell authored
22 rect(10, height-boxHeight-10, 45,boxHeight);
642e2b0 @mhenstell hud subclass
mhenstell authored
23 pCamera.endHUD();
24 }
25
26 }
Something went wrong with that request. Please try again.