Browse Source

Hide/show layer panel on l press

master
Krisjanis Rijnieks 9 years ago
parent
commit
e7a23a4a2b
  1. 12
      src/Application/Modes/ProjectionMappingMode.cpp
  2. 1
      src/Application/Modes/ProjectionMappingMode.h

12
src/Application/Modes/ProjectionMappingMode.cpp

@ -5,6 +5,7 @@ namespace piMapper {
ProjectionMappingMode::ProjectionMappingMode(){ ProjectionMappingMode::ProjectionMappingMode(){
_surfaceScaleBeforeTransform = 1.0f; _surfaceScaleBeforeTransform = 1.0f;
_bDrawLayerPanel = true;
} }
ProjectionMappingMode * ProjectionMappingMode::_instance = 0; ProjectionMappingMode * ProjectionMappingMode::_instance = 0;
@ -41,7 +42,10 @@ void ProjectionMappingMode::draw(Application * app){
Gui::instance()->getScaleWidget().draw(); Gui::instance()->getScaleWidget().draw();
} }
Gui::instance()->getLayerPanelWidget().draw(); if(_bDrawLayerPanel){
Gui::instance()->getLayerPanelWidget().draw();
}
Gui::instance()->getSurfaceHighlightWidget().draw(); Gui::instance()->getSurfaceHighlightWidget().draw();
} }
@ -291,7 +295,11 @@ void ProjectionMappingMode::onKeyPressed(Application * app, ofKeyEventArgs & arg
app->getSurfaceManager()->getSelectedSurface()->getScale() - 0.2f)); app->getSurfaceManager()->getSelectedSurface()->getScale() - 0.2f));
} }
break; break;
case 'l':
_bDrawLayerPanel = !_bDrawLayerPanel;
break;
/* /*
case 'n': // Set next preset case 'n': // Set next preset
app->getSurfaceManager()->setNextPreset(); app->getSurfaceManager()->setNextPreset();

1
src/Application/Modes/ProjectionMappingMode.h

@ -70,6 +70,7 @@ class ProjectionMappingMode : public ApplicationBaseMode {
ofVec2f _clickPosition; ofVec2f _clickPosition;
bool _bSurfaceDrag; bool _bSurfaceDrag;
bool _bDrawLayerPanel;
}; };

Loading…
Cancel
Save