Added John's text-positioning modification.
The lines that he was altering were very oddly-split, so while I was at it, I repaired the line-break damage. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@243 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
1ea15ad9e1
commit
9f78016727
@ -215,13 +215,12 @@ static GLboolean fghCheckMenuStatus( SFG_Window* window, SFG_Menu* menu )
|
||||
menuEntry->SubMenu->X = menu->X + menu->Width ;
|
||||
menuEntry->SubMenu->Y = menu->Y + menuEntry->Ordinal * FREEGLUT_MENU_HEIGHT ;
|
||||
|
||||
if ( menuEntry->SubMenu->X + menuEntry->SubMenu->Width > glutGet (
|
||||
GLUT_SCREEN_WIDTH ) )
|
||||
if ( menuEntry->SubMenu->X + menuEntry->SubMenu->Width > glutGet (GLUT_SCREEN_WIDTH ) )
|
||||
menuEntry->SubMenu->X = menu->X - menuEntry->SubMenu->Width;
|
||||
|
||||
if ( menuEntry->SubMenu->Y + menuEntry->SubMenu->Height > glutGet (
|
||||
GLUT_SCREEN_HEIGHT ) )
|
||||
menuEntry->SubMenu->Y -=menuEntry->SubMenu->Height ;
|
||||
if ( menuEntry->SubMenu->Y + menuEntry->SubMenu->Height > glutGet (GLUT_SCREEN_HEIGHT ) )
|
||||
menuEntry->SubMenu->Y -= (menuEntry->SubMenu->Height -
|
||||
FREEGLUT_MENU_HEIGHT - 2*FREEGLUT_MENU_BORDER);
|
||||
|
||||
fgSetWindow ( menuEntry->SubMenu->Window ) ;
|
||||
glutPositionWindow ( menuEntry->SubMenu->X, menuEntry->SubMenu->Y ) ;
|
||||
|
Reference in New Issue
Block a user