diff --git a/src/UserInterface/ProjectionEditor.cpp b/src/UserInterface/ProjectionEditor.cpp index 48906b2..a22fa2b 100644 --- a/src/UserInterface/ProjectionEditor.cpp +++ b/src/UserInterface/ProjectionEditor.cpp @@ -36,27 +36,14 @@ void ProjectionEditor::unregisterMouseEvents(){ &ProjectionEditor::mouseDragged); } -void ProjectionEditor::registerKeyEvents(){ - ofAddListener(ofEvents().keyPressed, this, &ProjectionEditor::keyPressed); - ofAddListener(ofEvents().keyReleased, this, &ProjectionEditor::keyReleased); -} - -void ProjectionEditor::unregisterKeyEvents(){ - ofRemoveListener(ofEvents().keyPressed, this, &ProjectionEditor::keyPressed); - ofRemoveListener(ofEvents().keyReleased, this, - &ProjectionEditor::keyReleased); -} - void ProjectionEditor::enable(){ registerAppEvents(); registerMouseEvents(); - registerKeyEvents(); } void ProjectionEditor::disable(){ unregisterAppEvents(); unregisterMouseEvents(); - unregisterKeyEvents(); } void ProjectionEditor::update(ofEventArgs & args){ @@ -123,52 +110,6 @@ void ProjectionEditor::mouseDragged(ofMouseEventArgs & args){ } } -void ProjectionEditor::keyPressed(ofKeyEventArgs & args){ - /* - int key = args.key; - float moveStep; - - if(bShiftKeyDown){ - moveStep = 10.0f; - }else{ - moveStep = 0.5f; - } - - switch(key){ - case OF_KEY_LEFT: - moveSelection(ofVec2f(-moveStep, 0.0f)); - break; - - case OF_KEY_RIGHT: - moveSelection(ofVec2f(moveStep, 0.0f)); - break; - - case OF_KEY_UP: - moveSelection(ofVec2f(0.0f, -moveStep)); - break; - - case OF_KEY_DOWN: - moveSelection(ofVec2f(0.0f, moveStep)); - break; - - case OF_KEY_SHIFT: - bShiftKeyDown = true; - break; - } - */ -} - -void ProjectionEditor::keyReleased(ofKeyEventArgs & args){ - /* - int key = args.key; - switch(key){ - case OF_KEY_SHIFT: - bShiftKeyDown = false; - break; - } - */ -} - void ProjectionEditor::gotMessage(ofMessage & msg){ if(msg.message == "surfaceSelected"){ // refresh gui diff --git a/src/UserInterface/ProjectionEditor.h b/src/UserInterface/ProjectionEditor.h index 46457b4..f16fc62 100644 --- a/src/UserInterface/ProjectionEditor.h +++ b/src/UserInterface/ProjectionEditor.h @@ -16,8 +16,6 @@ class ProjectionEditor { void unregisterAppEvents(); void registerMouseEvents(); void unregisterMouseEvents(); - void registerKeyEvents(); - void unregisterKeyEvents(); void enable(); void disable(); @@ -25,8 +23,6 @@ class ProjectionEditor { void update(ofEventArgs & args); void draw(); void mouseDragged(ofMouseEventArgs & args); - void keyPressed(ofKeyEventArgs & args); - void keyReleased(ofKeyEventArgs & args); void gotMessage(ofMessage & msg); void setSurfaceManager(SurfaceManager * newSurfaceManager); void clearJoints();