comparison gui/ui/main.c @ 33993:57d711d3dcca

Change parameter b of wsMoveWindow(). Make it Bool, rename it abs and reverse its meaning. The parameter now indicates whether x and y shall be handled as real, absolute position values or as possibly mock ones.
author ib
date Thu, 08 Sep 2011 11:11:02 +0000
parents bb35e74851cd
children 68633e7c5e1e
comparison
equal deleted inserted replaced
33992:4dda3e85b298 33993:57d711d3dcca
336 if ( guiApp.subWindow.isFullScreen ) 336 if ( guiApp.subWindow.isFullScreen )
337 { 337 {
338 uiFullScreen(); 338 uiFullScreen();
339 } 339 }
340 wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth / 2, guiInfo.VideoHeight / 2 ); 340 wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth / 2, guiInfo.VideoHeight / 2 );
341 wsMoveWindow( &guiApp.subWindow, False, 341 wsMoveWindow( &guiApp.subWindow, True,
342 ( wsMaxX - guiInfo.VideoWidth/2 )/2 + wsOrgX, 342 ( wsMaxX - guiInfo.VideoWidth/2 )/2 + wsOrgX,
343 ( wsMaxY - guiInfo.VideoHeight/2 )/2 + wsOrgY ); 343 ( wsMaxY - guiInfo.VideoHeight/2 )/2 + wsOrgY );
344 btnSet( evFullScreen,btnReleased ); 344 btnSet( evFullScreen,btnReleased );
345 } 345 }
346 break; 346 break;
350 if ( guiApp.subWindow.isFullScreen ) 350 if ( guiApp.subWindow.isFullScreen )
351 { 351 {
352 uiFullScreen(); 352 uiFullScreen();
353 } 353 }
354 wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth * 2, guiInfo.VideoHeight * 2 ); 354 wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth * 2, guiInfo.VideoHeight * 2 );
355 wsMoveWindow( &guiApp.subWindow, False, 355 wsMoveWindow( &guiApp.subWindow, True,
356 ( wsMaxX - guiInfo.VideoWidth*2 )/2 + wsOrgX, 356 ( wsMaxX - guiInfo.VideoWidth*2 )/2 + wsOrgX,
357 ( wsMaxY - guiInfo.VideoHeight*2 )/2 + wsOrgY ); 357 ( wsMaxY - guiInfo.VideoHeight*2 )/2 + wsOrgY );
358 btnSet( evFullScreen,btnReleased ); 358 btnSet( evFullScreen,btnReleased );
359 } 359 }
360 break; 360 break;
364 if ( guiApp.subWindow.isFullScreen ) 364 if ( guiApp.subWindow.isFullScreen )
365 { 365 {
366 uiFullScreen(); 366 uiFullScreen();
367 } 367 }
368 wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight ); 368 wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight );
369 wsMoveWindow( &guiApp.subWindow, True, guiApp.sub.x, guiApp.sub.y ); 369 wsMoveWindow( &guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y );
370 btnSet( evFullScreen,btnReleased ); 370 btnSet( evFullScreen,btnReleased );
371 break; 371 break;
372 } else if ( !guiApp.subWindow.isFullScreen ) break; 372 } else if ( !guiApp.subWindow.isFullScreen ) break;
373 case evFullScreen: 373 case evFullScreen:
374 if ( guiInfo.VideoWindow && guiInfo.Playing ) 374 if ( guiInfo.VideoWindow && guiInfo.Playing )
375 { 375 {
376 uiFullScreen(); 376 uiFullScreen();
377 if ( !guiApp.subWindow.isFullScreen ) 377 if ( !guiApp.subWindow.isFullScreen )
378 { 378 {
379 wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight ); 379 wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight );
380 wsMoveWindow( &guiApp.subWindow, True, guiApp.sub.x, guiApp.sub.y ); 380 wsMoveWindow( &guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y );
381 } 381 }
382 } 382 }
383 if ( guiApp.subWindow.isFullScreen ) btnSet( evFullScreen,btnPressed ); 383 if ( guiApp.subWindow.isFullScreen ) btnSet( evFullScreen,btnPressed );
384 else btnSet( evFullScreen,btnReleased ); 384 else btnSet( evFullScreen,btnReleased );
385 break; 385 break;
521 case wsMoveMouse: 521 case wsMoveMouse:
522 item=&guiApp.mainItems[SelectedItem]; 522 item=&guiApp.mainItems[SelectedItem];
523 switch ( itemtype ) 523 switch ( itemtype )
524 { 524 {
525 case itPLMButton: 525 case itPLMButton:
526 wsMoveWindow( &guiApp.mainWindow,False,RX - abs( sx ),RY - abs( sy ) ); 526 wsMoveWindow( &guiApp.mainWindow,True,RX - abs( sx ),RY - abs( sy ) );
527 uiMainRender=0; 527 uiMainRender=0;
528 break; 528 break;
529 case itPRMButton: 529 case itPRMButton:
530 uiMenuMouseHandle( X,Y,RX,RY ); 530 uiMenuMouseHandle( X,Y,RX,RY );
531 break; 531 break;