Created
February 13, 2019 00:44
-
-
Save kmancher/b4effde6632b3ccdec6237cadf6bb375 to your computer and use it in GitHub Desktop.
Weight counter text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PFont f; | |
| int weight = 0; | |
| void setup() { | |
| size(640, 360); | |
| // Create the font | |
| //printArray(PFont.list()); | |
| f = createFont("SpaceMono-Bold.ttf", 18); | |
| textFont(f); | |
| } | |
| void draw() { | |
| background(102); | |
| textAlign(RIGHT); | |
| fill(255); | |
| text(weight + " pounds of trash thrown away", width-10, height-10); | |
| } | |
| void mousePressed() { | |
| weight++; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment