comparison Gui/mplayer/menu.h @ 1823:a6c67352ccac

fix some bug.
author pontscho
date Sat, 01 Sep 2001 17:53:07 +0000
parents d237c5d4b216
children d21f8afc7680
comparison
equal deleted inserted replaced
1822:85dda3b18445 1823:a6c67352ccac
53 { 53 {
54 wsPostRedisplay( &appMPlayer.menuWindow ); 54 wsPostRedisplay( &appMPlayer.menuWindow );
55 return; 55 return;
56 } 56 }
57 57
58 for( i=0;i<appMPlayer.NumberOfMenuItems+1;i++ ) 58 for( i=0;i<=appMPlayer.NumberOfMenuItems;i++ )
59 { 59 {
60 if ( wgIsRect( x,y, 60 if ( wgIsRect( x,y,
61 appMPlayer.MenuItems[i].x,appMPlayer.MenuItems[i].y, 61 appMPlayer.MenuItems[i].x,appMPlayer.MenuItems[i].y,
62 appMPlayer.MenuItems[i].x+appMPlayer.MenuItems[i].width,appMPlayer.MenuItems[i].y+appMPlayer.MenuItems[i].height ) ) mplMenuItem=i; 62 appMPlayer.MenuItems[i].x+appMPlayer.MenuItems[i].width,appMPlayer.MenuItems[i].y+appMPlayer.MenuItems[i].height ) ) { mplMenuItem=i; break; }
63 } 63 }
64 wsPostRedisplay( &appMPlayer.menuWindow ); 64 wsPostRedisplay( &appMPlayer.menuWindow );
65 } 65 }
66 66
67 void mplShowMenu( int mx,int my ) 67 void mplShowMenu( int mx,int my )
90 90
91 if ( !appMPlayer.menuBase.Bitmap.Image ) return; 91 if ( !appMPlayer.menuBase.Bitmap.Image ) return;
92 92
93 x=mx-mplMenuX; 93 x=mx-mplMenuX;
94 y=my-mplMenuY; 94 y=my-mplMenuY;
95 // x=RX - appMPlayer.menuWindow.X;
96 // y=RY - appMPlayer.menuWindow.Y;
95 97
96 wsVisibleWindow( &appMPlayer.menuWindow,wsHideWindow ); 98 wsVisibleWindow( &appMPlayer.menuWindow,wsHideWindow );
97 99
98 if ( ( x < 0 ) || ( y < 0 ) ) return; 100 if ( ( x < 0 ) || ( y < 0 ) ) return;
99 101
102 printf( "---------> %d %d,%d\n",i,x,y );
103 printf( "--------> mi: %d,%d %dx%d\n",appMPlayer.MenuItems[i].x,appMPlayer.MenuItems[i].y,appMPlayer.MenuItems[i].width,appMPlayer.MenuItems[i].height );
100 if ( wgIsRect( x,y, 104 if ( wgIsRect( x,y,
101 appMPlayer.MenuItems[i].x,appMPlayer.MenuItems[i].y, 105 appMPlayer.MenuItems[i].x,appMPlayer.MenuItems[i].y,
102 appMPlayer.MenuItems[i].x+appMPlayer.MenuItems[i].width, 106 appMPlayer.MenuItems[i].x+appMPlayer.MenuItems[i].width,
103 appMPlayer.MenuItems[i].y+appMPlayer.MenuItems[i].height ) ) 107 appMPlayer.MenuItems[i].y+appMPlayer.MenuItems[i].height ) )
104 { 108 {