if( gui_menu_on ) {
// printf("Hiding Menu\n");
mainMenuBar->hide ();
-#if defined(WIN32_CURSOR_TWEAKS)
+#if defined(WIN32_CURSOR_TWEAKS_OFF)
if( mouse_mode == MOUSE_POINTER )
TurnCursorOff();
-#endif // #ifdef WIN32_CURSOR_TWEAKS
+#endif // WIN32_CURSOR_TWEAKS_OFF
} else {
// printf("Showing Menu\n");
mainMenuBar->reveal();
#ifdef WIN32
TurnCursorOn();
-#endif // #ifdef WIN32
+#endif // WIN32
}
gui_menu_on = ~gui_menu_on;
}
}
}
-// Do this is the person presses cancel
+// Do this if the person presses cancel
void LoadDialogCancel(puObject *) {
FG_POP_PUI_DIALOG( LoadDialog );
}
int y = (fgGetInt("/sim/startup/ysize")/2 - 100/2);
YNdialogBox = new puDialogBox (x, y); // 150, 50
- // YNdialogBox = new puDialogBox (150, 50);
{
YNdialogFrame = new puFrame (0,0,400, 100);
SGPath path( globals->get_fg_root() );
path.append( "Docs/index.html" );
+#if !defined(WIN32)
string help_app = fgGetString("/sim/startup/browser-app");
if ( system("xwininfo -name Netscape > /dev/null 2>&1") == 0 ) {
} else {
command = help_app + " " + path.str();
}
-#if !defined(WIN32)
command += " &";
+#else // WIN32
+ command = "start ";
+ command += path.str();
#endif
system( command.c_str() );
#if defined(WIN32) || defined(__CYGWIN32__)
#define WIN32_CURSOR_TWEAKS
+// uncomment this for cursor to turn off when menu is disabled
+// #define WIN32_CURSOR_TWEAKS_OFF
#elif (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
#define X_CURSOR_TWEAKS
#endif
void TurnCursorOn( void )
{
mouse_active = ~0;
-#if defined(WIN32_CURSOR_TWEAKS)
+#if defined(WIN32)
switch (mouse_mode) {
case MOUSE_POINTER:
glutSetCursor(GLUT_CURSOR_INHERIT);
globals->get_current_view()->set_goal_view_offset(0.0);
#ifdef NO_SMOOTH_MOUSE_VIEW
globals->get_current_view()->set_view_offset(0.0);
-#endif
-#endif // RESET_VIEW_ON_LEAVING_MOUSE_VIEW
+#endif // NO_SMOOTH_MOUSE_VIEW
+#endif // RESET_VIEW_ON_LEAVING_MOUSE_VIEW
glutSetCursor(GLUT_CURSOR_INHERIT);
+#if defined(WIN32_CURSOR_TWEAKS_OFF)
if(!gui_menu_on)
TurnCursorOff();
-
+#endif // WIN32_CURSOR_TWEAKS_OFF
+
SG_LOG( SG_INPUT, SG_INFO, "Mouse in pointer mode" );
break;
- }
+ } // end switch (mouse_mode)
glutWarpPointer( x, y );
} // END RIGHT BUTTON
} // END UPDOWN == GLUT_DOWN
{
sprintf( NewNetId, "%s", fgGetString("/sim/networking/call-sign").c_str() );
// sprintf( NewNetId, "%s", fgd_callsign );
- int len = 150 - puGetStringWidth( puGetDefaultLabelFont(),
- NewNetIdLabel ) / 2;
+ int len = 150 - puGetDefaultLabelFont().getStringWidth( NewNetIdLabel ) / 2;
NetIdDialog = new puDialogBox (150, 50);
{
{
// sprintf( NewNetId, "%s", fgGetString("/sim/networking/call-sign").c_str() );
// sprintf( NewNetId, "%s", fgd_callsign );
- int len = 170 - puGetStringWidth( puGetDefaultLabelFont(),
- NewNetFGDLabel ) / 2;
+ int len = 170
+ - puGetDefaultLabelFont().getStringWidth( NewNetFGDLabel ) / 2;
NetFGDDialog = new puDialogBox (310, 30);
{