Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
londonp
londonp's Profile
1
Posts
0
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
void mousePressed() not working
[1 Reply]
11-Feb-2013 12:10 PM
Forum:
Programming Questions
This is the general idea of what is happening in my program, but nothing within the if() statement is working, not even on the first click. All variables are declared outside of void. tfStatement is present in boolean statements within draw.
//
void mousePressed() {
if(dist(mouseX, mouseY, objectPosX, objectPosY) <= objectWidth/2) {
tfStatement = false;
print("stuff");
}
if(dist(mouseX, mouseY, object2PosX, object2PosY) <= object2Width/2) {
tfStatement = false;
print("stuff");
}
}
//
If there's any other information needed (such as what other loops are present in void draw(), I can provide whatever's relevant.
*Note: Creating a simple object with no background, translate, or rotate works fine. tfStatement seems to have no effect.
«Prev
Next »
Moderate user : londonp
Forum