Mercurial > mplayer.hg
diff Gui/mplayer/pb.c @ 17254:0e152834911a
vpotmeter fix, scroll in the correct direction
author | ods15 |
---|---|
date | Tue, 27 Dec 2005 19:21:04 +0000 |
parents | 0e1471d9da74 |
children | 86350b4b8203 |
line wrap: on
line diff
--- a/Gui/mplayer/pb.c Tue Dec 27 13:01:22 2005 +0000 +++ b/Gui/mplayer/pb.c Tue Dec 27 19:21:04 2005 +0000 @@ -154,12 +154,16 @@ switch( itemtype ) { case itPotmeter: - case itVPotmeter: case itHPotmeter: btnModify( item->msg,(float)( X - item->x ) / item->width * 100.0f ); mplEventHandling( item->msg,item->value ); value=item->value; break; + case itVPotmeter: + btnModify( item->msg, ( 1. - (float)( Y - item->y ) / item->height) * 100.0f ); + mplEventHandling( item->msg,item->value ); + value=item->value; + break; } mplEventHandling( item->msg,value ); @@ -188,6 +192,9 @@ case itPotmeter: item->value=(float)( X - item->x ) / item->width * 100.0f; goto potihandled; + case itVPotmeter: + item->value=(1. - (float)( Y - item->y ) / item->height) * 100.0f; + goto potihandled; case itHPotmeter: item->value=(float)( X - item->x ) / item->width * 100.0f; potihandled: