|
|
@ -175,33 +175,33 @@ void ProjectionMappingMode::onKeyPressed(Application * app, ofKeyEventArgs & arg |
|
|
|
|
|
|
|
case OF_KEY_UP: |
|
|
|
if(app->isShiftKeyDown()){ |
|
|
|
app->getCmdManager()->exec(new MvSelectionCmd(app->getSurfaceManager(), ofVec2f(0.0f, -10.0f))); |
|
|
|
moveSelection(app, ofVec2f(0.0f, -10.0f)); |
|
|
|
}else{ |
|
|
|
app->getCmdManager()->exec(new MvSelectionCmd(app->getSurfaceManager(), ofVec2f(0.0f, -1.0f))); |
|
|
|
moveSelection(app, ofVec2f(0.0f, -1.0f)); |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
|
case OF_KEY_DOWN: |
|
|
|
if(app->isShiftKeyDown()){ |
|
|
|
app->getCmdManager()->exec(new MvSelectionCmd(app->getSurfaceManager(), ofVec2f(0.0f, 10.0f))); |
|
|
|
moveSelection(app, ofVec2f(0.0f, 10.0f)); |
|
|
|
}else{ |
|
|
|
app->getCmdManager()->exec(new MvSelectionCmd(app->getSurfaceManager(), ofVec2f(0.0f, 1.0f))); |
|
|
|
moveSelection(app, ofVec2f(0.0f, 1.0f)); |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
|
case OF_KEY_LEFT: |
|
|
|
if(app->isShiftKeyDown()){ |
|
|
|
app->getCmdManager()->exec(new MvSelectionCmd(app->getSurfaceManager(), ofVec2f(-10.0f, 0.0f))); |
|
|
|
moveSelection(app, ofVec2f(-10.0f, 0.0f)); |
|
|
|
}else{ |
|
|
|
app->getCmdManager()->exec(new MvSelectionCmd(app->getSurfaceManager(), ofVec2f(-1.0f, 0.0f))); |
|
|
|
moveSelection(app, ofVec2f(-1.0f, 0.0f)); |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
|
case OF_KEY_RIGHT: |
|
|
|
if(app->isShiftKeyDown()){ |
|
|
|
app->getCmdManager()->exec(new MvSelectionCmd(app->getSurfaceManager(), ofVec2f(10.0f, 0.0f))); |
|
|
|
moveSelection(app, ofVec2f(10.0f, 0.0f)); |
|
|
|
}else{ |
|
|
|
app->getCmdManager()->exec(new MvSelectionCmd(app->getSurfaceManager(), ofVec2f(1.0f, 0.0f))); |
|
|
|
moveSelection(app, ofVec2f(1.0f, 0.0f)); |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
@ -444,5 +444,11 @@ void ProjectionMappingMode::selectPrevSurface(Application * app){ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void ProjectionMappingMode::moveSelection(Application * app, ofVec2f by){ |
|
|
|
app->getCmdManager()->exec( |
|
|
|
new MvSelectionCmd( |
|
|
|
app->getSurfaceManager(), by)); |
|
|
|
} |
|
|
|
|
|
|
|
} // namespace piMapper
|
|
|
|
} // namespace ofx
|