当前位置: 首页>>代码示例>>C++>>正文


C++ InterfaceGl::setOptions方法代码示例

本文整理汇总了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'");

}
开发者ID:patrickFuerst,项目名称:ForelleVisualApp,代码行数:10,代码来源:ForelleVisualAppApp.cpp

示例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(); } );
}
开发者ID:imclab,项目名称:Pockets,代码行数:9,代码来源:SpriteSheetGeneratorApp.cpp

示例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' " );
    }
}
开发者ID:gaborpapp,项目名称:apps,代码行数:20,代码来源:FolApp.cpp

示例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) ) );
        

}
开发者ID:patrickFuerst,项目名称:ForelleVisualApp,代码行数:94,代码来源:ForelleVisualAppApp.cpp


注:本文中的params::InterfaceGl::setOptions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。