projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Made Modifers variable global as per glut classic.
[freeglut]
/
src
/
freeglut_structure.c
diff --git
a/src/freeglut_structure.c
b/src/freeglut_structure.c
index
2871e32
..
0824a34
100644
(file)
--- a/
src/freeglut_structure.c
+++ b/
src/freeglut_structure.c
@@
-69,7
+69,8
@@
void fgClearCallBacks( SFG_Window *window )
* If parent is set to NULL, the window created will be a topmost one.
*/
SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title,
* If parent is set to NULL, the window created will be a topmost one.
*/
SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title,
- int x, int y, int w, int h, GLboolean gameMode )
+ int x, int y, int w, int h,
+ GLboolean gameMode, GLboolean isMenu )
{
/*
* Have the window object created
{
/*
* Have the window object created
@@
-104,9
+105,8
@@
SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title,
* Set the default mouse cursor and reset the modifiers value
*/
window->State.Cursor = GLUT_CURSOR_INHERIT;
* Set the default mouse cursor and reset the modifiers value
*/
window->State.Cursor = GLUT_CURSOR_INHERIT;
- window->State.Modifiers = 0xffffffff;
- window->IsMenu = fgState.BuildingAMenu ;
+ window->IsMenu = isMenu;
/*
* Open the window now. The fgOpenWindow() function is system
/*
* Open the window now. The fgOpenWindow() function is system
@@
-142,22
+142,13
@@
SFG_Menu* fgCreateMenu( FGCBMenu menuCallback )
menu->ParentWindow = fgStructure.Window;
/*
menu->ParentWindow = fgStructure.Window;
/*
- * Create a window for the menu to reside in. Set the
- * global variable BuildingAMenu to true so we can ensure
- * it is created without decorations.
+ * Create a window for the menu to reside in.
*/
*/
- fgState.BuildingAMenu = GL_TRUE;
- fgCreateWindow( NULL, NULL, x, y, w, h, GL_FALSE );
+ fgCreateWindow( NULL, NULL, x, y, w, h, GL_FALSE, GL_TRUE );
menu->Window = fgStructure.Window;
glutDisplayFunc( fgDisplayMenu );
menu->Window = fgStructure.Window;
glutDisplayFunc( fgDisplayMenu );
- /*
- * While BuildingAMenu is true, all windows built have no decorations.
- * That's not a good default behavior, so let's set it false again.
- */
- fgState.BuildingAMenu = GL_FALSE;
-
glutHideWindow( ); /* Hide the window for now */
fgSetWindow( current_window );
glutHideWindow( ); /* Hide the window for now */
fgSetWindow( current_window );