-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
OpenFrameworks Essentials
By :
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.
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 parameters:
ofApp class's declaration:ofxGuiGroup primGroup; ofxFloatSlider shiftY, rotate; ofxVec2Slider size; ofxColorSlider color; ofxToggle filled, type;
The first line declares...
Change the font size
Change margin width
Change background colour