Mercurial > hg > screen-ui
comparison src/Voice.cpp @ 10:a8f71b5bdb0e
Toned down colours, increased buffer zone, added visual constraint feedback.
author | samer |
---|---|
date | Fri, 27 Jan 2012 09:23:43 +0000 |
parents | d879a30556f8 |
children | 317637282293 |
comparison
equal
deleted
inserted
replaced
9:3dff71c0e7fd | 10:a8f71b5bdb0e |
---|---|
12 Voice::Voice(int id, int x, int y){ | 12 Voice::Voice(int id, int x, int y){ |
13 this->id=id; | 13 this->id=id; |
14 posx=x; | 14 posx=x; |
15 posy=y; | 15 posy=y; |
16 isActive=true; | 16 isActive=true; |
17 radius=15; | 17 radius=12; |
18 inTriangle=false; | 18 inTriangle=false; |
19 octave=0; | 19 octave=0; |
20 highlight=false; | 20 highlight=false; |
21 } | 21 } |
22 | 22 |
23 Voice::Voice(){} | 23 Voice::Voice(){} |
24 | 24 |
25 void Voice::draw(){ | 25 void Voice::draw(){ |
26 ofSetColor(255,0,0); | 26 ofSetColor(200,0,0); |
27 | 27 |
28 if (isActive){ | 28 if (isActive){ |
29 | |
30 ofFill(); | 29 ofFill(); |
31 }else { | 30 } else { |
32 ofNoFill(); | 31 ofNoFill(); |
33 } | 32 } |
34 ofCircle(posx, posy, radius); | 33 ofCircle(posx, posy, radius); |
35 if (highlight){ | 34 if (highlight){ |
36 ofNoFill(); | 35 ofSetColor(255, 192, 192); |
37 ofSetColor(255, 255, 255); | 36 } |
38 ofCircle(posx, posy, radius); | 37 ofNoFill(); |
39 } | 38 ofCircle(posx, posy, radius); |
40 } | 39 } |
41 | 40 |
42 bool Voice::isInVoice(int x, int y){ | 41 bool Voice::isInVoice(int x, int y){ |
43 if (ofDist(x, y, posx, posy)<=radius){ | 42 if (ofDist(x, y, posx, posy)<=radius){ |
44 return true; | 43 return true; |