void midiSequencer::draw(int _x, int _y) { x=_x; w=ofGetWidth()-x; y=_y; mark.y=y+10; band->drawBackground(); //Draw measure lines drawDivs(true); band->drawInstruments(); ofSetColor(0xA0835B); ofRect(x, y, w, h); ofShade(x, y+h, 15, w, OF_UP, .4); ofShade(x, y+h, 5, w, OF_DOWN, .3); drawDivs(false); drawMark(); // Bottom scroll bar ofShade(_x, band->getBottomPos(), 5, w, OF_UP, .3); int botY=band->getBottomPos(); if(bar.available()){ bar.draw(_x, band->getBottomPos()); botY=bar.y+bar.h+2; } int botH=ofGetHeight()-botY; //Task bar on bottom ofSetColor(0xA0835B); ofShadeBox(x,botY, w, botH, OF_DOWN, .3); //ofShade(x, bar.y+bar.h+2, 5, w, OF_UP, .3); ofShade(x,botY, 10, w, OF_DOWN, .3); double indent=8; ofRoundShadow(x+w/2-playBut.w/2-indent/2, botY+(botH/2-playBut.h/2)-indent/2, playBut.w+indent, playBut.h+indent, playBut.w/2+indent/2, 1); playBut.draw(x+w/2-playBut.w/2, botY+(botH-playBut.h)/2); ofRoundShadow(x+w/2-playBut.w/2-indent/2-50, botY+(botH/2-rewindBut.h/2)-indent/2,\ rewindBut.w+indent, rewindBut.h+indent, rewindBut.w/2+indent/2, 1); rewindBut.draw(x+w/2-playBut.w/2-50, botY+(botH-rewindBut.h)/2); ofRoundShadow(x+w/2-playBut.w/2-indent/2-100, botY+(botH/2-loopBut.h/2)-indent/2, loopBut.w+indent, loopBut.h+indent, loopBut.w/2+indent/2, 1); loopBut.draw(x+w/2-playBut.w/2-100, botY+(botH-loopBut.h)/2); ofRoundShadow(display.x-10-indent/2, display.y-10-indent/2,\ display.w+20+indent, display.h+20+indent, 5, 1); ofSetColor(0, 0, 0); ofRoundBox(display.x-10, display.y-10, display.w+20, display.h+20, 5, .2); ofSetColor(0, 128, 200); int secs=metronome.getElapsed(); display.draw(ssprintf("%02i:%02i.%02i",(secs/1000/60),(secs/1000)%60,(secs%1000/10)), x+w/2+playBut.w/2+20, botY+(botH-display.h)/2); }
void sideBar::draw(int _x, int _y){ x=_x, y=_y; ofRoundShadow(x+5,y,w,h,h/4, .5); ofSetColor(0x555555); ofRoundBox(x,y,w,h,h/4, .2); ofSetColor(color); if(!Open) ofRoundBox(x-(w-60),y,w,h,h/4, .2); else ofRoundBox(x,y,w,h,h/4, .2); glColor3f(1,1,1); arialHeader.drawString(filename,x+w/4,y+3*h/4); if(Open){ int temp=y+h+20; for (unsigned int j=0; j<blocks.size(); j++) { blocks[j].draw(20,temp); temp+=blocks[j].h+20; } } }