Refine transport controls.

pull/3/head
Jonathan Moore Liles 2008-04-27 16:08:30 -05:00
parent 6bcadabe8d
commit 5a4cb046d0
2 changed files with 15 additions and 12 deletions

View File

@ -114,7 +114,7 @@ free( path );} {}
label {Non-DAW - Timeline} open label {Non-DAW - Timeline} open
xywh {577 50 1024 768} type Double resizable xclass {Non-DAW} visible xywh {577 50 1024 768} type Double resizable xclass {Non-DAW} visible
} { } {
Fl_Menu_Bar menubar {open Fl_Menu_Bar menubar {open selected
xywh {0 0 1024 25} xywh {0 0 1024 25}
} { } {
Submenu {} { Submenu {} {
@ -185,19 +185,14 @@ exit( 0 );}
xywh {10 10 40 25} shortcut 0xff57 xywh {10 10 40 25} shortcut 0xff57
} }
MenuItem {} { MenuItem {} {
label Stop label {Play/Stop}
callback {transport->stop();} callback {transport->toggle();}
xywh {20 20 40 25} shortcut 0x50073 xywh {20 20 40 25} shortcut 0x20
}
MenuItem {} {
label Play
callback {transport->start();}
xywh {30 30 40 25} shortcut 0x50070
} }
MenuItem {} { MenuItem {} {
label Record label Record
callback {transport->toggle_record();} callback {transport->toggle_record();}
xywh {40 40 40 25} shortcut 0x50072 xywh {40 40 40 25} shortcut 0x10072
} }
} }
Submenu {} { Submenu {} {
@ -265,7 +260,7 @@ exit( 0 );}
} }
MenuItem {} { MenuItem {} {
label {Magnetic snap} label {Magnetic snap}
callback {Timeline::snap_magnetic = menu_picked_value( o );} selected callback {Timeline::snap_magnetic = menu_picked_value( o );}
xywh {10 10 40 25} type Toggle value 1 xywh {10 10 40 25} type Toggle value 1
} }
Submenu {} { Submenu {} {

View File

@ -57,6 +57,13 @@ private:
toggle(); toggle();
else if ( w == _record_button ) else if ( w == _record_button )
{ {
if ( _record_button->value() )
w->labelcolor( FL_RED );
else
w->labelcolor( fl_color_average( FL_RED, FL_WHITE, 0.25f ) );
redraw();
if ( rolling ) if ( rolling )
if ( _record_button->value() ) if ( _record_button->value() )
timeline->record(); timeline->record();
@ -107,9 +114,10 @@ public:
_record_button = o = new Fl_Button( 0, 0, bw, 0, "@circle" ); _record_button = o = new Fl_Button( 0, 0, bw, 0, "@circle" );
o->type( FL_TOGGLE_BUTTON ); o->type( FL_TOGGLE_BUTTON );
o->labeltype( FL_EMBOSSED_LABEL ); o->labeltype( FL_EMBOSSED_LABEL );
o->labelcolor( FL_RED ); o->labelcolor( fl_color_average( FL_RED, FL_WHITE, 0.25f ) );
o->shortcut( 'R' ); o->shortcut( 'R' );
o->callback( cb_button, this ); o->callback( cb_button, this );
o->when( FL_WHEN_CHANGED );
o->box( FL_UP_BOX ); o->box( FL_UP_BOX );
end(); end();