MCPcopy Create free account
hub / github.com/braitsch/ofxDatGui / setup

Method setup

example-ColorPickers/src/ofApp.cpp:9–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7*/
8
9void ofApp::setup()
10{
11 ofSetWindowShape(1920, 1080);
12 ofSetWindowPosition(ofGetScreenWidth()/2 - ofGetWidth()/2, 0);
13// create a color picker (passing in a color is optional) //
14 picker = new ofxDatGuiColorPicker("COLOR PICKER", ofColor::fromHex(0xCECECE));
15 picker->setAnchor(ofxDatGuiAnchor::TOP_LEFT);
16
17// and register a callback to listen for change events //
18 picker->onColorPickerEvent(this, &ofApp::onColorPickerEvent);
19}
20
21void ofApp::onColorPickerEvent(ofxDatGuiColorPickerEvent e)
22{

Callers

nothing calls this directly

Calls 2

setAnchorMethod · 0.80
onColorPickerEventMethod · 0.45

Tested by

no test coverage detected