Mercurial > mplayer.hg
diff Gui/mplayer/menu.h @ 1823:a6c67352ccac
fix some bug.
author | pontscho |
---|---|
date | Sat, 01 Sep 2001 17:53:07 +0000 |
parents | d237c5d4b216 |
children | d21f8afc7680 |
line wrap: on
line diff
--- a/Gui/mplayer/menu.h Sat Sep 01 15:49:31 2001 +0000 +++ b/Gui/mplayer/menu.h Sat Sep 01 17:53:07 2001 +0000 @@ -55,11 +55,11 @@ return; } - for( i=0;i<appMPlayer.NumberOfMenuItems+1;i++ ) + for( i=0;i<=appMPlayer.NumberOfMenuItems;i++ ) { if ( wgIsRect( x,y, appMPlayer.MenuItems[i].x,appMPlayer.MenuItems[i].y, - appMPlayer.MenuItems[i].x+appMPlayer.MenuItems[i].width,appMPlayer.MenuItems[i].y+appMPlayer.MenuItems[i].height ) ) mplMenuItem=i; + appMPlayer.MenuItems[i].x+appMPlayer.MenuItems[i].width,appMPlayer.MenuItems[i].y+appMPlayer.MenuItems[i].height ) ) { mplMenuItem=i; break; } } wsPostRedisplay( &appMPlayer.menuWindow ); } @@ -92,11 +92,15 @@ x=mx-mplMenuX; y=my-mplMenuY; +// x=RX - appMPlayer.menuWindow.X; +// y=RY - appMPlayer.menuWindow.Y; wsVisibleWindow( &appMPlayer.menuWindow,wsHideWindow ); if ( ( x < 0 ) || ( y < 0 ) ) return; + printf( "---------> %d %d,%d\n",i,x,y ); + printf( "--------> mi: %d,%d %dx%d\n",appMPlayer.MenuItems[i].x,appMPlayer.MenuItems[i].y,appMPlayer.MenuItems[i].width,appMPlayer.MenuItems[i].height ); if ( wgIsRect( x,y, appMPlayer.MenuItems[i].x,appMPlayer.MenuItems[i].y, appMPlayer.MenuItems[i].x+appMPlayer.MenuItems[i].width,