Browse Source

Clean up SurfaceMangerGui::mouseDragged()

master
Krisjanis Rijnieks 9 years ago
parent
commit
a4939f3a34
  1. 10
      src/Surfaces/SurfaceManagerGui.cpp

10
src/Surfaces/SurfaceManagerGui.cpp

@ -96,21 +96,13 @@ void SurfaceManagerGui::mousePressed(ofMouseEventArgs & args){
void SurfaceManagerGui::mouseDragged(ofMouseEventArgs & args){ void SurfaceManagerGui::mouseDragged(ofMouseEventArgs & args){
if(guiMode == GuiMode::TEXTURE_MAPPING){ if(guiMode == GuiMode::TEXTURE_MAPPING){
textureEditor.mouseDragged(args); textureEditor.mouseDragged(args);
}else if(guiMode == GuiMode::PROJECTION_MAPPING){
//projectionEditor.mouseDragged(args);
} }
if(bDrag){ if(bDrag){
ofVec2f mousePosition = ofVec2f(args.x, args.y); ofVec2f mousePosition = ofVec2f(args.x, args.y);
ofVec2f distance = mousePosition - clickPosition; ofVec2f distance = mousePosition - clickPosition;
if(guiMode == GuiMode::PROJECTION_MAPPING){ if(guiMode == GuiMode::TEXTURE_MAPPING){
// Moves the selected surface on drag
//projectionEditor.moveSelectedSurface(distance);
}else if(guiMode == GuiMode::TEXTURE_MAPPING){
// Moves the crop area of the texture
textureEditor.moveTexCoords(distance); textureEditor.moveTexCoords(distance);
} }
clickPosition = mousePosition; clickPosition = mousePosition;

Loading…
Cancel
Save