| 6 | */ |
| 7 | |
| 8 | void 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 | |
| 29 | void ofApp::update() |
| 30 | { |
nothing calls this directly
no test coverage detected