Tweaks for new panel invocation.
This commit is contained in:
parent
dcf9dd9a1b
commit
f2d507fbd5
1 changed files with 6 additions and 15 deletions
|
@ -445,29 +445,20 @@ void GLUTspecialkey(int k, int x, int y) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case GLUT_KEY_F3: {
|
case GLUT_KEY_F3: {
|
||||||
ifstream input("panel.xml");
|
string panel_path =
|
||||||
if (!input.good()) {
|
current_properties.getStringValue("/sim/panel",
|
||||||
FG_LOG(FG_INPUT, FG_ALERT,
|
"Panels/Default/default.xml");
|
||||||
"Cannot read panel configuration from panel.xml");
|
FGPanel * new_panel = fgReadPanel(panel_path);
|
||||||
return;
|
|
||||||
}
|
|
||||||
FGPanel * new_panel = fgReadPanel(input);
|
|
||||||
if (new_panel == 0) {
|
if (new_panel == 0) {
|
||||||
FG_LOG(FG_INPUT, FG_ALERT,
|
FG_LOG(FG_INPUT, FG_ALERT,
|
||||||
"Error reading new panel from panel.xml");
|
"Error reading new panel from " << panel_path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
FG_LOG(FG_INPUT, FG_INFO, "Loaded new panel from panel.xml");
|
FG_LOG(FG_INPUT, FG_INFO, "Loaded new panel from " << panel_path);
|
||||||
delete current_panel;
|
delete current_panel;
|
||||||
current_panel = new_panel;
|
current_panel = new_panel;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case GLUT_KEY_F4: {
|
|
||||||
delete current_panel;
|
|
||||||
current_panel = fgCreateSmallSinglePropPanel(0, 0, 1024, 768);
|
|
||||||
FG_LOG(FG_INPUT, FG_INFO, "Reverted to built-in panel");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
case GLUT_KEY_END: // numeric keypad 1
|
case GLUT_KEY_END: // numeric keypad 1
|
||||||
v->set_goal_view_offset( FG_PI * 0.75 );
|
v->set_goal_view_offset( FG_PI * 0.75 );
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue