Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

Using ofxGui slider values outside of ofApp

$
0
0

you can create the parameter as a static variable like:

//.h
class Wave{
public:
...
static ofParameter<float> speed;
}

//wave.cpp
static ofParameter<float> Wave::speed{"wave speed",0,10,100};

in ofApp:

//.h
ofxPanel gui;
vector<Wave> wave;

//setup
wave.setup();
gui.add(Wave::speed)

Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>