From e632e908a973a87c82e061f36167ea162d1e390f Mon Sep 17 00:00:00 2001 From: Comment Date: Thu, 8 Aug 2013 22:09:59 +0100 Subject: a few playlist changes + whole screen fade --- liveengineUnmapped/src/viewport.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'liveengineUnmapped/src/viewport.cpp') diff --git a/liveengineUnmapped/src/viewport.cpp b/liveengineUnmapped/src/viewport.cpp index e533ef4..36e7c65 100755 --- a/liveengineUnmapped/src/viewport.cpp +++ b/liveengineUnmapped/src/viewport.cpp @@ -24,7 +24,7 @@ void viewport::setup(int _w,int _h,int _x,int _y,float _r,int _ox,int _oy) { printf("%ix%i, vp offset: %f,%f\n",w,h,-(sin(ofDegToRad(r))*h/2)-(cos(ofDegToRad(r))*w/2),-(sin(ofDegToRad(r))*w/2)-(cos(ofDegToRad(r))*h/2)); } -void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,playlist &list,bool transparentBlack,int note,int mode,ofColor* controller_colours,bool controlColours,float scale,float fscale,float colShift){ +void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,playlist &list,bool transparentBlack,int note,int mode,ofColor* controller_colours,bool controlColours,float scale,float fscale,float colShift,int fadeBG){ @@ -53,6 +53,14 @@ void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,pla } } + if (fadeBG<255) { + //fadeout part + ofEnableAlphaBlending(); + ofSetColor(0,0,0,fadeBG); + ofRect(0,0,ofGetWidth(),ofGetHeight()); + ofDisableAlphaBlending(); + } + float notewidth=w/NUM_NOTES; float noteheight=h/NUM_CONTROLLERS; -- cgit v1.2.3