X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_menu.c;h=bdff2a530eb5acdf9508468f476e408f48e6faf0;hb=9c3c848ff232b56793bef2d91d29283ff80326b4;hp=9bffdf9132e8bd7f600e7e5dc0a5200b87a60fb7;hpb=074fe7a4ceb20811af83f735d5db74d69d11442c;p=freeglut diff --git a/src/freeglut_menu.c b/src/freeglut_menu.c index 9bffdf9..bdff2a5 100644 --- a/src/freeglut_menu.c +++ b/src/freeglut_menu.c @@ -29,7 +29,7 @@ #include "config.h" #endif -#include "../include/GL/freeglut.h" +#include #include "freeglut_internal.h" /* -- DEFINITIONS ---------------------------------------------------------- */ @@ -127,7 +127,7 @@ static GLboolean fghCheckMenuStatus( SFG_Window* window, SFG_Menu* menu ) if( menuEntry->SubMenu && menuEntry->IsActive ) { /* - * OK, have the sub-menu checked, too. If it returns TRUE, it + * OK, have the sub-menu checked, too. If it returns GL_TRUE, it * will mean that it caught the mouse cursor and we do not need * to regenerate the activity list, and so our parents do... */ @@ -289,7 +289,7 @@ static void fghDisplayMenuBox( SFG_Menu* menu ) glVertex2i( menu->Width - border, border); glEnd( ); - glColor4fv( menu_pen_back ) ; + glColor4fv( menu_pen_back ); glBegin( GL_QUADS ); glVertex2i( border, border); glVertex2i( menu->Width - border, border); @@ -362,7 +362,8 @@ static void fghDisplayMenuBox( SFG_Menu* menu ) /* * Have the label drawn, character after character: */ - glutBitmapString( FREEGLUT_MENU_FONT, menuEntry->Text); + glutBitmapString( FREEGLUT_MENU_FONT, + (unsigned char *)menuEntry->Text); /* * If it's a submenu, draw a right arrow @@ -674,15 +675,20 @@ void fghCalculateMenuBoxSize( void ) /* * Update the menu entry's width value */ - menuEntry->Width = glutBitmapLength( FREEGLUT_MENU_FONT, - menuEntry->Text ); + menuEntry->Width = glutBitmapLength( + FREEGLUT_MENU_FONT, + (unsigned char *)menuEntry->Text + ); /* * If the entry is a submenu, then it needs to be wider to * accomodate the arrow. JCJ 31 July 2003 */ if (menuEntry->SubMenu ) - menuEntry->Width += glutBitmapLength( FREEGLUT_MENU_FONT, "_" ); + menuEntry->Width += glutBitmapLength( + FREEGLUT_MENU_FONT, + (unsigned char *)"_" + ); /* * Check if it's the biggest we've found