O'Reilly logo

openFrameworks Essentials by Denis Perevalov, Igor Tatarnikov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing a checkbox, a color selector, and a 2D slider

Until now, we have dealt only with float and integer sliders. Let's explore new types of controls: checkbox, color selector, and 2D slider, implemented by the ofxToggle, ofColorSlider, and ofVec2Slider classes, respectively.

Note

There exist classes of controls that are out of the scope of this book. These are the ofxButton button class, the ofxLabel text label class, and the ofxVec3Slider 3D slider class and the ofxVec4Slider 4D slider class. See openFrameworks' gui/guiExample example for details on using buttons and labels. The 3D sliders work similarly to 2D sliders, which we will consider now.

We investigate them by creating a group of controls to adjust the geometric primitive's drawing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required