Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
fieldsofmisery
fieldsofmisery's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
n00b question
[2 Replies]
25-Mar-2011 05:01 PM
Forum:
Programming Questions
I have this code:
PFont f;
void setup() {
size(300,500);
f = createFont("Arial", 24, true);
}
void draw() {
size(1200,500);
background(255);
fill(100);
String timeActual = nf(hour(), 2) + ":" + nf(minute(),2) + ":" + nf(second(), 2);
if ((mouseX > 30) && (mouseX < 190) && (mouseY > 120) && (mouseY < 180)) { //top left button
fill(200,50,50,50);
rect(30,120,160,60);
noFill();
if(mousePressed) {
String timeLog = nf(hour(), 2) + ":" + nf(minute(),2) + ":" + nf(second(), 2);
}
}
text(timeActual,150, 250);
text(timeLog, 150, 270);
}
I need the string "timeLog" to appear as text. I try to make it public, it doesnt like it. I've moved the variable declaration around, it will not have any of that either. This really should be very simple, but it is giving me all this grief.
Thanks in advance for the help.
«Prev
Next »
Moderate user : fieldsofmisery
Forum