ofxPiMapper fixed for C++17 & oF 12.0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

23 lines
498 B

#include "AddSurfaceCmd.h"
namespace ofx {
namespace piMapper {
AddSurfaceCmd::AddSurfaceCmd(ofxPiMapper * app, int surfaceType){
_app = app;
_surfaceType = surfaceType;
}
void AddSurfaceCmd::exec(){
BaseSurface * surface = SurfaceFactory::instance()->createSurface(_surfaceType);
_app->getSurfaceManager()->addSurface(surface);
}
void AddSurfaceCmd::undo(){
ofLogNotice("AddSurfaceCmd", "undo");
_app->getSurfaceManager()->removeSurface();
}
} // namespace piMapper
} // namespace ofx