hi…
i have this situation. n object on the screen (the objects are simple of rect) and when i pass with the mouse on one of these it happens somethings. i have a problem becaouse when the mouse passes on one of these nothing happen… i have implement all in this way:
void testApp::update(){
for(int i=0; i<num; i++){
if((punto[i])->mouse(mouseX, mouseY)){
cout<<"ok"<<endl;
}
}
}
where the funciont mouse is:
bool Punto::mouse(float a, float b){
ofVec2f getLocTemp(getLoc());
if((a= getLocTemp.x) && ( b= getLocTemp.y)){
return true;
}else
return false;
}
and getLoc()
const ofVec2f & Punto::getLoc() const{
return loc;
}
thankss