Mercurial > hg > screen-ui
view src/Voice.h @ 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 | f4ebb87adec1 |
children |
line wrap: on
line source
/* * Voice.h * MelodyTriangle * * Created by Henrik Ekeus on 12/01/2012. * Copyright 2012 Queen Mary University of London. All rights reserved. * */ #include "ofMain.h" #define RADIUS 12 class Voice { public: Voice(int id); enum status { clear, pending, waiting, moved }; bool isInVoice(int x, int y) { return (ofDist(x, y, posx, posy)<=RADIUS); }; //void setPos(int x, int y) { posx=x; posy=y; status=pending; } double louder(); double quieter(); void draw(bool highlight); void draw_alt(bool highlight); int id; int posx,posy; bool isVisible; bool isActive; bool inTriangle; int octave; double amplitude; enum status status; float truex, truey; };