This seems like it would be handy if we can find a place for it in the
new menu system.

Thanks,

Curt.

Norman Vine writes:
> A  FullScreen / Windowed  mode  Toggler
> 
> This uses the depricated menu system
> but should be easy enough to convert 
> if desired
> 
> Enjoy
> 
> Norman
> 
> =============
> // menubar.cxx
> 
> extern void toggleFullScreen (puObject *);
> static bool
> do_fullscreen_dialog (const SGPropertyNode * arg)
> {
>     cout << "toggleFullScreen" << endl;
>     toggleFullScreen(0);
>     return true;
> }
> 
> 
> static struct {
>     const char * name;
>     SGCommandMgr::command_t command;
> } deprecated_dialogs [] = {
>     { "old-fullscreen_dialog", do_fullscreen_dialog },
> 
> 
> ===================
> // gui_funcs.cxx
> 
> void toggleFullScreen (puObject *)
> {
>     static int _saved_ww, _saved_wh;
>     static bool _fullscreen = 0;
>     
>     _fullscreen = !_fullscreen;
>     if (_fullscreen)
>     {
>         _saved_ww = (fgGetInt("/sim/startup/xsize"));
>         _saved_wh = (fgGetInt("/sim/startup/ysize"));
>         glutFullScreen();
>         fgReshape( glutGet(GLUT_WINDOW_WIDTH), glutGet(GLUT_WINDOW_HEIGHT) );
>     } else
>     {
>         glutReshapeWindow(_saved_ww,_saved_wh);
>         fgReshape( _saved_ww, _saved_wh );
>     }
> }
> 
> 
> ===========
> # menubar.xml
> 
>   <item>
>    <label>Toggle Fullscreen</label>
>    <binding>
>     <command>old-fullscreen_dialog</command>
>    </binding>
>   </item>
> 
> 
> 
> _______________________________________________
> Flightgear-devel mailing list
> [EMAIL PROTECTED]
> http://mail.flightgear.org/mailman/listinfo/flightgear-devel

-- 
Curtis Olson   IVLab / HumanFIRST Program       FlightGear Project
Twin Cities    [EMAIL PROTECTED]                  [EMAIL PROTECTED]
Minnesota      http://www.menet.umn.edu/~curt   http://www.flightgear.org

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to