Mercurial > hg > tweakathon2ios
diff testApp.mm @ 7:4e00f92567d9
separated GUI setup stuff
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Fri, 17 Oct 2014 15:13:35 +0100 |
parents | 92850a2b099c |
children | d59de9fd3496 |
line wrap: on
line diff
--- a/testApp.mm Fri Oct 17 14:50:50 2014 +0100 +++ b/testApp.mm Fri Oct 17 15:13:35 2014 +0100 @@ -166,36 +166,8 @@ messageOrganiser.setBottomPanel(bottomButtonPanel); UIElements.push_back(bottomButtonPanel); bottomButtonPanel->showBorder(false); - -} -//-------------------------------------------------------------- -void testApp::setupUIElements(){ - - // eventually: sliderpanel, topbuttonpanel, submitbuttonpanel, countdown panel, - - // --------------------- BUTTONS - UIProps p; - ofBackground(p.generalBackground); - - - // ------------------------------------ SLIDERS - - vector<controllerType> sl2; - sl2.push_back(SLIDER); - - SliderPanel * controlPanel = new SliderPanel(1, - 160, - ofGetWidth(), - p.sliderPanelHeight, - p, - sl2); - - UIElements.push_back(controlPanel); - messageOrganiser.setControlPanel(controlPanel); - controlPanel->showBorder(true); - - // - - - - - -- - - OTHER BITS +// - - - - - -- - - OTHER BITS CountdownText * countDownBox = new CountdownText("5" , 500, 380, 455, 455, p); UIElements.push_back(countDownBox); @@ -215,7 +187,7 @@ UIElements.push_back(finishPanel); finishPanel->hide(); - + Buttron * newTestButton = new Buttron(ofGetWidth()-300,690, p); newTestButton->setLabel("Next Test"); @@ -228,28 +200,35 @@ messageOrganiser.setTargetSymbol(targetSymbol); UIElements.push_back(targetSymbol); - // alternation speed +} +//-------------------------------------------------------------- +void testApp::setupSliderPanel(){ + UIProps p; + vector<controllerType> sl2; + sl2.push_back(SLIDER); + + SliderPanel * controlPanel = new SliderPanel(1, + 160, + ofGetWidth(), + p.sliderPanelHeight, + p, + sl2); + + UIElements.push_back(controlPanel); + messageOrganiser.setControlPanel(controlPanel); + controlPanel->showBorder(true); +} +//-------------------------------------------------------------- +void testApp::setupUIElements(){ + + UIProps p; + ofBackground(p.generalBackground); + + setupSearchViewPanels(); + + setupSliderPanel(); -// ButtronSlider * speedSlider = new ButtronSlider(ofGetWidth()-60, 210, 50, p.sliderHeight/2,FILL, p); -// UIElements.push_back(speedSlider); -// messageOrganiser.mapButtonToAction(speedSlider, SPEED_CHANGE_ID); -// -// Buttron * altButton = new Buttron(ofGetWidth()-60, 500, 50, 50,p); -// UIElements.push_back(altButton); -// altButton->setLabel("Alt"); -// messageOrganiser.mapButtonToAction(altButton, START_ALTERNATE_ID); - -// TextPanel * speedLabel = new TextPanel("Speed", ofGetWidth()-55, 195, 50,20,p); -// speedLabel->setText("Speed"); -// speedLabel->setFontSize(SMALLFONT); -// speedLabel->show(); -// UIElements.push_back(speedLabel); - - // volume -// ButtronSlider * volumeSlider = new ButtronSlider(50, 210, 30, p.sliderHeight,FILL, p); -// UIElements.push_back(volumeSlider); -// messageOrganiser.mapButtonToAction(volumeSlider, VOLUME_CHANGE_ID); } //-------------------------------------------------------------------------- void testApp::initialiseMIDI(){