Browse Source

Hide/show layer panel on l press

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

10
src/Application/Modes/ProjectionMappingMode.cpp

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

1
src/Application/Modes/ProjectionMappingMode.h

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

Loading…
Cancel
Save