Browse Source

Clean up BaseJoint

master
Krisjanis Rijnieks 9 years ago
parent
commit
6564107b8e
  1. 21
      src/UserInterface/BaseJoint.cpp
  2. 4
      src/UserInterface/BaseJoint.h

21
src/UserInterface/BaseJoint.cpp

@ -6,30 +6,11 @@ namespace piMapper {
BaseJoint::BaseJoint(){
setDefaultColors();
setDefaultProperties();
registerMouseEvents();
}
BaseJoint::~BaseJoint(){
unregisterMouseEvents();
}
void BaseJoint::registerMouseEvents(){
//ofAddListener(ofEvents().mousePressed, this, &BaseJoint::mousePressed);
//ofAddListener(ofEvents().mouseDragged, this, &BaseJoint::mouseDragged);
}
void BaseJoint::unregisterMouseEvents(){
//ofRemoveListener(ofEvents().mousePressed, this, &BaseJoint::mousePressed);
//ofRemoveListener(ofEvents().mouseDragged, this, &BaseJoint::mouseDragged);
}
void BaseJoint::mousePressed(ofMouseEventArgs & args){
cout << "BaseJoint::mousePressed()" << endl;
if(hitTest(ofVec2f(args.x, args.y))){
// selected = true;
clickDistance = position - ofVec2f(args.x, args.y);
// startDrag();
}
}
@ -38,8 +19,6 @@ void BaseJoint::mouseReleased(int x, int y, int button){
}
void BaseJoint::mouseDragged(ofMouseEventArgs & args){
cout << "BaseJoint::mouseDragged()" << endl;
if(!bDrag){
return;
}

4
src/UserInterface/BaseJoint.h

@ -9,10 +9,6 @@ class BaseJoint {
public:
BaseJoint();
~BaseJoint();
void registerMouseEvents();
void unregisterMouseEvents();
ofVec2f position;
bool enabled;

Loading…
Cancel
Save