Thanks for the reply. I didn't have the cout local but it returns now a 1 with a 0 right after it. Two values at once and thats without releasing. I am on 8.4 on xcode 7.1.1 El Capitan.
void ofApp::setup(){
ofBackground(0);
w = ofGetWidth();
h = ofGetHeight();
size = 20;
clicked = false;
}
//----------------------------------------------------
void ofApp::draw(){
ofSetColor(255);
if((ofDist(w/2, h/2, mouseX, mouseY)<size)&& clicked == true){
ofFill();
} else {
ofNoFill();
}
ofCircle(w/2,h/2,size,size);
}
//--------------------------------
void ofApp::keyPressed(int key){
//WORKS
if(key == 'a'){
clicked = !clicked;
}
//----------------------------------
void ofApp::mousePressed(int x, int y, int button){
//doesn't work
if(button == 0){
clicked = !clicked;
}
cout<<clicked<<endl;
}
Also it should be noted that on that version the mouse wouldn't show up on the screen but their was a fix that I found on here. Possibly that is screwing something up? I really don't want to upgrade because I'm working a lot with the raspberry pi and a handful of addons. Thanks for ensuring me that I wasn't loosing my mind. However if anyone has a solution it would be much appreciated. I definitely think its an error now because the toggle box on the gui also did the same thing. It was a test at the time so I didn't think much of it.
Edit: However just so you know:
void ofApp::mousePressed(int x, int y, int button){
if(button == 0){
clicked = true;
}
Does return true and just one value. So the pressed function seems to be working.