[MPlayer-cvslog] CVS: main/Gui/mplayer mw.c, 1.117, 1.118 common.c, 1.10, 1.11 pb.c, 1.7, 1.8
Oded Shimon CVS
syncmail at mplayerhq.hu
Tue Dec 27 20:21:06 CET 2005
CVS change done by Oded Shimon CVS
Update of /cvsroot/mplayer/main/Gui/mplayer
In directory mail:/var2/tmp/cvs-serv11632/Gui/mplayer
Modified Files:
mw.c common.c pb.c
Log Message:
vpotmeter fix, scroll in the correct direction
Index: mw.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/mw.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -r1.117 -r1.118
--- mw.c 8 Dec 2005 22:12:56 -0000 1.117
+++ mw.c 27 Dec 2005 19:21:04 -0000 1.118
@@ -432,12 +432,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 );
itemtype=0;
@@ -476,7 +480,7 @@
item->value=(float)( X - item->x ) / item->width * 100.0f;
goto potihandled;
case itVPotmeter:
- item->value=(float)( Y - item->y ) / item->height * 100.0f;
+ 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;
Index: common.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/common.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- common.c 8 Dec 2005 22:12:56 -0000 1.10
+++ common.c 27 Dec 2005 19:21:04 -0000 1.11
@@ -268,9 +268,9 @@
PutImage( &item->Bitmap,
item->x,item->y,
item->phases,
- item->phases * ( item->value / 100.0f ) );
+ item->phases * ( 1. - item->value / 100.0f ) );
PutImage( &item->Mask,
- item->x,item->y + (int)( ( item->height - item->psy ) * item->value / 100.0f ),
+ item->x,item->y + (int)( ( item->height - item->psy ) * ( 1. - item->value / 100.0f ) ),
3,item->pressed );
break;
case itSLabel:
Index: pb.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/pb.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- pb.c 8 Dec 2005 22:12:56 -0000 1.7
+++ pb.c 27 Dec 2005 19:21:04 -0000 1.8
@@ -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:
More information about the MPlayer-cvslog
mailing list