本文整理汇总了C++中params::InterfaceGl::setOptions方法的典型用法代码示例。如果您正苦于以下问题:C++ InterfaceGl::setOptions方法的具体用法?C++ InterfaceGl::setOptions怎么用?C++ InterfaceGl::setOptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类params::InterfaceGl
的用法示例。
在下文中一共展示了InterfaceGl::setOptions方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: showClusterBar
void ForelleVisualAppApp::showClusterBar()
{
bShowClusterBar = !bShowClusterBar;
clusterBar.isVisible(bShowClusterBar);
if(bShowClusterBar)
menueBar.setOptions("Show ClusterBar" , "label='Hide ClusterBar'");
else
menueBar.setOptions("Show ClusterBar" , "label='Show ClusterBar'");
}
示例2: setup
void SpriteSheetGeneratorApp::setup()
{
mParams = params::InterfaceGl( "SpriteSheet Generator", Vec2i( 200, 200 ) );
mParams.setOptions( "", "position='50 450'" );
mParams.addParam( "Preview scaling", &mWindowScaling, "min=0.1 max=2.0 step=0.05");
mParams.addParam( "Preview offset", &mPreviewOffset.y );
mParams.addParam( "Output name", &mFilename );
mParams.addButton( "Save sheet", [this](){ saveSpriteSheet(); } );
}
示例3: toggleRecording
void FolApp::toggleRecording()
{
if ( mNI.isRecording() )
{
mNI.stopRecording();
mParams.setOptions( "Stop recording", " label='Start recording' " );
}
else
{
string path = getAppPath().string();
#ifdef CINDER_MAC
path += "/../";
#endif
path += "rec-" + timeStamp() + ".oni";
fs::path oniPath(path);
mNI.startRecording( oniPath );
mParams.setOptions( "Start recording", " label='Stop recording' " );
}
}
示例4: setup
void ForelleVisualAppApp::setup()
{
loadSettings();
// Setup the parameters
clusterBar = ClusterBar( "Cluster Window", Vec2i( 200, 400 ) );
//Setup menueBar
menueBar = params::InterfaceGl( "Menue Window", Vec2i(300, 400 ), ColorA(0.5,0.5,0.5,0.1) );
menueBar.setOptions("", "text=light position='724 0' valueswidth=100 contained=true");
menueBar.addButton("Clear Scene ", std::bind( &ForelleVisualAppApp::clearScene, this ) );
menueBar.addButton("Delete Selected Cluster", std::bind( &ForelleVisualAppApp::deleteCluster, this ) );
menueBar.addParam("Draw Grid" , &drawGrid,"");
menueBar.addParam("Read Pixel" , &readPixels, "true=reading false='not reading'");
menueBar.addButton("Refresh ClusterBar", std::bind( &ForelleVisualAppApp::refreshClusterBar, this ) );
menueBar.addParam("Update Cluster" , &updateCluster,"true=updating false='not updating'");
menueBar.addParam("Send only Selected Cluster" , &selectedClusterOn,"");
menueBar.addSeparator();
menueBar.addButton("Load Scene ", std::bind( &ForelleVisualAppApp::loadScene, this ) );
menueBar.addButton("Load Cluster to Universe ", std::bind( &ForelleVisualAppApp::loadClusterToUniverse, this ) );
menueBar.addParam(" Load to Universe" , &templateUniverse,"min=0 max=3 step=1");
menueBar.addButton("Save as Cluster", std::bind( &ForelleVisualAppApp::saveAsCluster, this ) );
menueBar.addButton("Save as Scene", std::bind( &ForelleVisualAppApp::saveAsScene, this ) );
menueBar.addButton("Save as Standart Scene", std::bind( &ForelleVisualAppApp::saveAsStandartScene, this ) );
menueBar.addParam("Send Data" , &sendData,"true=sending false='not sending'");
menueBar.addSeparator();
menueBar.addSeparator();
menueBar.addParam("All On" , &bAllOn,"");
menueBar.addParam("All Off" , &bAllOff,"");
menueBar.addButton("Show ClusterBar", std::bind( &ForelleVisualAppApp::showClusterBar, this ) );
menueBar.show(false);
for (int i=0; i < Const::MAX_DMX_CHANNELS ; i++) {
data1[i]= 0;
data2[i]= 0;
data3[i]= 0;
data4[i]= 0;
}
//setup boolean variables
readPixels = true;
sendData = true;
drawGrid = true;
updateCluster = true;
bAllOn = false;
bAllOff = false;
bShowClusterBar = false;
selectedClusterOn = false;
//default load out templates to universe 0
templateUniverse = 0;
// set our pointer to the last added cluster
if(!clusters.empty())
selectedCluster = clusters.end()-1;
controller.printClusters(clusters);
//Setup Artnetnode
if(ipAdress.empty() )
ipAdress = "10.0.2.1"; //if it isn´t initalised already
node = CinderArtnet("Art-Net Test", "LongName", ipAdress);
node.setNodeTypeAsServer();
node.setSubnetAdress(0);
node.enableDMXPortAsInputAndSetAdress(0,1);
node.enableDMXPortAsInputAndSetAdress(1, 2);
node.enableDMXPortAsInputAndSetAdress(2, 3);
node.enableDMXPortAsInputAndSetAdress(3, 4);
node.printConfig();
node.startNode();
// initalize start our Syphone Client
client.setup(Vec2i(60,60));
pos = Vec2i(0,0);
scale = 9;
mLogo = gl::Texture( loadImage( loadResource(RES_LOGO) ) );
}