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

Method setup

example-TextInputs/src/ofApp.cpp:9–20  ·  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
14 input = new ofxDatGuiTextInput("TEXT INPUT", "Type Something Here");
15 input->onTextInputEvent(this, &ofApp::onTextInputEvent);
16 input->setFocused(true);
17 input->setWidth(800, .2);
18 input->setPosition(ofGetWidth()/2 - input->getWidth()/2, 240);
19 font.load("ofxbraitsch/fonts/Verdana.ttf", 24);
20}
21
22void ofApp::onTextInputEvent(ofxDatGuiTextInputEvent e)
23{

Callers

nothing calls this directly

Calls 5

setFocusedMethod · 0.80
onTextInputEventMethod · 0.45
setWidthMethod · 0.45
setPositionMethod · 0.45
getWidthMethod · 0.45

Tested by

no test coverage detected