summaryrefslogtreecommitdiffstats
path: root/Gui
diff options
context:
space:
mode:
authorods15 <ods15@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-12-27 19:21:04 +0000
committerods15 <ods15@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-12-27 19:21:04 +0000
commit2e4aba523e1e977ac0c7f57c1989d91fe34fde99 (patch)
treea1a3f6c9da0870aaaf4c17794747280cb33522f0 /Gui
parentb65d8349426e1819677f23d632a0b902a9549415 (diff)
downloadmpv-2e4aba523e1e977ac0c7f57c1989d91fe34fde99.tar.bz2
mpv-2e4aba523e1e977ac0c7f57c1989d91fe34fde99.tar.xz
vpotmeter fix, scroll in the correct direction
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17255 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r--Gui/mplayer/common.c4
-rw-r--r--Gui/mplayer/mw.c8
-rw-r--r--Gui/mplayer/pb.c9
3 files changed, 16 insertions, 5 deletions
diff --git a/Gui/mplayer/common.c b/Gui/mplayer/common.c
index dd92522e96..40477c7c7d 100644
--- a/Gui/mplayer/common.c
+++ b/Gui/mplayer/common.c
@@ -268,9 +268,9 @@ void Render( wsTWindow * window,wItem * Items,int nrItems,char * db,int size )
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:
diff --git a/Gui/mplayer/mw.c b/Gui/mplayer/mw.c
index b87cba41fa..6a31222af7 100644
--- a/Gui/mplayer/mw.c
+++ b/Gui/mplayer/mw.c
@@ -432,12 +432,16 @@ void mplMainMouseHandle( int Button,int X,int Y,int RX,int RY )
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 @@ rollerhandled:
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;
diff --git a/Gui/mplayer/pb.c b/Gui/mplayer/pb.c
index ead422a7f4..69a3734509 100644
--- a/Gui/mplayer/pb.c
+++ b/Gui/mplayer/pb.c
@@ -154,12 +154,16 @@ void mplPBMouseHandle( int Button,int X,int Y,int RX,int RY )
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 @@ rollerhandled:
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: