-Updated binding for neatness, added active to goptions binding view

main
Harry van Haaren 2013-11-19 20:28:01 +00:00
parent ee561bb235
commit 7d639f2676
2 changed files with 18 additions and 3 deletions

View File

@ -11,7 +11,8 @@ typedef int LupppAction;
class Binding
{
public:
Binding() : status(0), data(0), action(0), active(false),track(-2),scene(-1),send(-1){}
Binding() : status(0), data(0), action(0), active(-1),
track(-2),scene(-1),send(-1) {}
unsigned char status;
unsigned char data;

View File

@ -260,7 +260,15 @@ void ControllerUI::addBinding( Binding* b )
tmp->spacing( 2 );
stringstream s;
s << Event::getPrettyName( b->action );
if ( b->action == MASTER_VOL )
s << "Master Volume";
else if ( false )
s << "stuff";
else
s << Event::getPrettyName( b->action );
if (b->track != -2)
s << " Track:" << b->track + 1;
@ -275,7 +283,13 @@ void ControllerUI::addBinding( Binding* b )
if ( b->send == Event::SEND_KEY )
s << " Sidechain Key";
if ( b->active != -1)
{
if ( b->active == true )
s << " On";
if ( b->active == false )
s << " Off";
}
Fl_Button* but = new Fl_Button(35, 35, 25, 25, "@square");
Fl_Box* b = new Fl_Box(35, 35, 400, 25, strdup(s.str().c_str()) );