--------------------------------------------------------------
| 3 | |
| 4 | //-------------------------------------------------------------- |
| 5 | void testApp::setup(){ |
| 6 | |
| 7 | ofSetFrameRate(30); |
| 8 | ofSetVerticalSync(true); |
| 9 | ofBackground(255*.15); |
| 10 | |
| 11 | gui = new ofxUICanvas(0,0, ofGetWidth(), ofGetHeight()); |
| 12 | gui->setWidgetFontSize(OFX_UI_FONT_MEDIUM); |
| 13 | gui->setWidgetPosition(OFX_UI_WIDGET_POSITION_RIGHT); |
| 14 | ipInput = gui->addTextInput("IP", "localhost", 300); |
| 15 | ipInput->setAutoClear(false); |
| 16 | portInput = gui->addTextInput("PORT", "12346", 150); |
| 17 | portInput->setAutoClear(false); |
| 18 | |
| 19 | gui->setWidgetPosition(OFX_UI_WIDGET_POSITION_DOWN); |
| 20 | commandInput = gui->addTextInput("COMMAND", "/duration/command", 300); |
| 21 | gui->setWidgetPosition(OFX_UI_WIDGET_POSITION_RIGHT); |
| 22 | arg1 = gui->addTextInput("ARG1", " ", 150); |
| 23 | arg2 = gui->addTextInput("ARG2", " ", 150); |
| 24 | arg3 = gui->addTextInput("ARG3", " ", 150); |
| 25 | sendButton = gui->addLabelButton("send >>", false); |
| 26 | commandInput->setAutoClear(false); |
| 27 | arg1->setAutoClear(false); |
| 28 | arg2->setAutoClear(false); |
| 29 | arg3->setAutoClear(false); |
| 30 | |
| 31 | //play controls |
| 32 | gui->setWidgetPosition(OFX_UI_WIDGET_POSITION_DOWN); |
| 33 | playButton = gui->addLabelButton("PLAY", false); |
| 34 | |
| 35 | gui->setWidgetPosition(OFX_UI_WIDGET_POSITION_RIGHT); |
| 36 | stopButton = gui->addLabelButton("STOP", false); |
| 37 | saveButton = gui->addLabelButton("SAVE", false); |
| 38 | |
| 39 | //TODO add duration setting |
| 40 | //ADD TRACKS |
| 41 | vector<string> trackTypes; |
| 42 | trackTypes.push_back("bangs"); |
| 43 | trackTypes.push_back("flags"); |
| 44 | trackTypes.push_back("switches"); |
| 45 | trackTypes.push_back("curves"); |
| 46 | trackTypes.push_back("colors"); |
| 47 | trackTypes.push_back("audio"); |
| 48 | |
| 49 | gui->setWidgetPosition(OFX_UI_WIDGET_POSITION_DOWN); |
| 50 | trackNameInput = gui->addTextInput("TRACK NAME", "track name", 200); |
| 51 | trackNameInput->setAutoClear(false); |
| 52 | |
| 53 | gui->setWidgetPosition(OFX_UI_WIDGET_POSITION_RIGHT); |
| 54 | addTrackDropdown = gui->addDropDownList("track type", trackTypes); |
| 55 | addTrackDropdown->setAutoClose(true); |
| 56 | addTrackDropdown->setAllowMultiple(false); |
| 57 | filePathInput = gui->addTextInput("TRACK FILEPATH", "track filepath [optional]", 200); |
| 58 | filePathInput->setAutoClear(false); |
| 59 | addTrackButton = gui->addLabelButton("add track >>", false); |
| 60 | |
| 61 | //REMOVE track |
| 62 | gui->setWidgetPosition(OFX_UI_WIDGET_POSITION_DOWN); |