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

Method setup

example-Matrices/src/ofApp.cpp:8–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6*/
7
8void ofApp::setup()
9{
10// setup a resolution for a grid //
11 numCols = 3;
12 numRows = 7;
13 ofSetWindowPosition(0, 0);
14 font.load("ofxbraitsch/fonts/Verdana.ttf", 24);
15
16// instantiate a matrix with a button for each box in our grid //
17 matrix = new ofxDatGuiMatrix("MATRIX", numCols*numRows, true);
18
19// matrices can also function as radio buttons (only 1 on at a time)
20 matrix->setRadioMode(true);
21
22// reduce the component opacity so it's easier to see behind it //
23 matrix->setOpacity(.75);
24
25// and optionally register to listen for events //
26 matrix->onMatrixEvent(this, &ofApp::onMatrixEvent);
27}
28
29void ofApp::update()
30{

Callers

nothing calls this directly

Calls 3

setRadioModeMethod · 0.80
setOpacityMethod · 0.45
onMatrixEventMethod · 0.45

Tested by

no test coverage detected