Browse Source

Add public selected variable

master
Krisjanis Rijnieks 11 years ago
parent
commit
2b83c5a3a7
  1. 3
      src/ofxBaseJoint.cpp
  2. 3
      src/ofxBaseJoint.h

3
src/ofxBaseJoint.cpp

@ -29,7 +29,7 @@ void ofxBaseJoint::mouseReleased(ofMouseEventArgs &args)
void ofxBaseJoint::mouseDragged(ofMouseEventArgs &args)
{
if ( !dragging ) return;
if ( !dragging ) return;
position = ofVec2f(args.x, args.y) + clickDistance;
}
@ -56,6 +56,7 @@ void ofxBaseJoint::setDefaultProperties()
position = ofVec2f(20.0f, 20.0f);
clickDistance = ofVec2f(0.0f, 0.0f);
dragging = false;
selected = false;
}
void ofxBaseJoint::registerAppEvents()

3
src/ofxBaseJoint.h

@ -8,8 +8,10 @@ public:
ofxBaseJoint();
~ofxBaseJoint();
ofVec2f position;
bool enabled;
bool visible;
bool selected;
void mousePressed(ofMouseEventArgs& args);
void mouseReleased(ofMouseEventArgs& args);
@ -24,7 +26,6 @@ public:
protected:
ofColor fillColor;
ofColor strokeColor;
ofVec2f position;
ofVec2f clickDistance;
bool dragging;

Loading…
Cancel
Save