Mercurial > hg > screen-ui
diff src/Voice.cpp @ 32:06a2fdb333ca
Added visibilty control for tokens; removed token highlight when keyboard disabled.
author | samer |
---|---|
date | Wed, 15 Feb 2012 10:14:04 +0000 |
parents | 417deb31dd4e |
children |
line wrap: on
line diff
--- a/src/Voice.cpp Tue Feb 07 14:23:32 2012 +0000 +++ b/src/Voice.cpp Wed Feb 15 10:14:04 2012 +0000 @@ -12,10 +12,13 @@ inline static double min(double x,double y) { return (x<y) ? x : y; } Voice::Voice(int id): - isActive(true), inTriangle(false), octave(0), amplitude(0.5), - status(pending), id(id), posx(0), posy(0), truex(-1), truey(-1) {} + isActive(true), inTriangle(false), isVisible(true), + octave(0), amplitude(0.5), status(pending), id(id), + posx(0), posy(0), truex(-1), truey(-1) {} void Voice::draw(bool highlight){ + if (!isVisible) return; + int r,g,b; switch (status) { case clear: r=1; g=1; b=0; break; @@ -34,10 +37,11 @@ ofNoFill(); if (highlight) ofSetColor(230, 230, 230); ofCircle(posx, posy, RADIUS); - } void Voice::draw_alt(bool highlight){ + if (!isVisible) return; + int r,g,b; switch (status) { case clear: r=1; g=1; b=0; break;