Search code examples
c++openglpangolin

creating slider bar using pangolin


Is there any way to create slider using pangolin? small example of creating slider with min and max value, when user clicks on ok button then call a function.


Solution

  • With some back Rand D i figured out a way to create a slider sort of thing: posting my answer incase if it can be of any ones help:

    pangolin::Var<float> menubf("menu.bf:", 10, 100, 150 );
    pangolin::Var<float> menuthDepth("menu.thDepth", 0, 0, 100 );
    pangolin::Var<float> menudepthMapFactor("menu.depth Map Factor", 0, 0, 100 );
    pangolin::Var<float> menufps("menu.fps", 0, 0, 100 );
    

    First value initial value when u load the application, second value :once u move it as a slider the initial value will be changed second value, 3rd value: end value (final value: slider will move till last value)