Mercurial > mplayer.hg
diff Gui/app.c @ 8973:0a665389cf2b
- add playbar
- add vpotmeter
- fix gtk menu's pixel bug
- fix some critical (10l) bug
author | pontscho |
---|---|
date | Fri, 17 Jan 2003 22:39:43 +0000 |
parents | d07ab8e088a9 |
children | 2a0619fd84f0 |
line wrap: on
line diff
--- a/Gui/app.c Fri Jan 17 21:44:58 2003 +0000 +++ b/Gui/app.c Fri Jan 17 22:39:43 2003 +0000 @@ -109,7 +109,6 @@ memcpy( &dest->main,&source->main,sizeof( wItem ) ); memcpy( &dest->sub,&source->sub,sizeof( wItem ) ); - memcpy( &dest->eq,&source->eq,sizeof( wItem ) ); memcpy( &dest->menuBase,&source->menuBase,sizeof( wItem ) ); memcpy( &dest->menuSelected,&source->menuSelected,sizeof( wItem ) ); } @@ -135,9 +134,9 @@ item->sub.x=-1; item->sub.y=-1; appClearItem( &item->menuBase ); appClearItem( &item->menuSelected ); - item->subR=0; - item->subG=0; - item->subB=0; + item->sub.R=item->sub.G=item->sub.B=0; + item->bar.R=item->bar.G=item->bar.B=0; + item->main.R=item->main.G=item->main.B=0; item->barIsPresent=0; item->menuIsPresent=0; } @@ -161,7 +160,7 @@ void btnModify( int event,float state ) { int j; - for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ ) + for ( j=0;j < appMPlayer.NumberOfItems + 1;j++ ) if ( appMPlayer.Items[j].msg == event ) { switch ( appMPlayer.Items[j].type ) @@ -171,6 +170,7 @@ appMPlayer.Items[j].tmp=(int)state; break; case itPotmeter: + case itVPotmeter: case itHPotmeter: if ( state < 0.0f ) state=0.0f; if ( state > 100.f ) state=100.0f; @@ -178,6 +178,25 @@ break; } } + + for ( j=0;j < appMPlayer.NumberOfBarItems + 1;j++ ) + if ( appMPlayer.barItems[j].msg == event ) + { + switch ( appMPlayer.barItems[j].type ) + { + case itButton: + appMPlayer.barItems[j].pressed=(int)state; + appMPlayer.barItems[j].tmp=(int)state; + break; + case itPotmeter: + case itVPotmeter: + case itHPotmeter: + if ( state < 0.0f ) state=0.0f; + if ( state > 100.f ) state=100.0f; + appMPlayer.barItems[j].value=state; + break; + } + } } float btnGetValue( int event )