Browse Source

Display Y-axis value for control points on mouse over.

tags/non-daw-v1.1.0
Jonathan Moore Liles 16 years ago
parent
commit
78afa80db8
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      Timeline/Control_Point.C

+ 13
- 0
Timeline/Control_Point.C View File

@@ -80,6 +80,15 @@ Control_Point::draw_box ( void )
fl_color( box_color() ); fl_color( box_color() );


fl_arc( x(), y(), w(), h(), 0, 360 ); fl_arc( x(), y(), w(), h(), 0, 360 );

if ( this == Sequence_Widget::belowmouse() ||
this == Sequence_Widget::pushed() )
{
char val[10];
snprintf( val, sizeof( val ), "%+.2f", 1.0 - _y * 2 );

draw_label( val, (Fl_Align)( FL_ALIGN_TOP | FL_ALIGN_LEFT ), FL_FOREGROUND_COLOR );
}
} }




@@ -95,6 +104,10 @@ Control_Point::handle ( int m )
sequence()->sort(); sequence()->sort();
redraw(); redraw();
break; break;
case FL_ENTER:
case FL_LEAVE:
redraw();
break;
case FL_DRAG: case FL_DRAG:
{ {
sequence()->sort(); sequence()->sort();


Loading…
Cancel
Save