/// <inheritdoc /> protected override void _drawGUI(int id) { close_button(); GUILayout.BeginVertical(); AutoGUI.AutoDrawObject(this); GUILayout.EndVertical(); GUI.DragWindow(); }
protected override void _drawGUI(int id) { close_button(); GUILayout.BeginVertical(); for (int i = 0; i < 3; i++) { GUILayout.Label("=======" + axis_names[i] + "======="); GUILayout.Label("ang vel = " + angular_v_buf[i].getLast().ToString("G8"), GUIStyles.labelStyleLeft); GUILayout.Label("ang acc = " + angular_acc_buf[i].getLast().ToString("G8"), GUIStyles.labelStyleLeft); GUILayout.Label("AoA = " + (aoa_buf[i].getLast() * rad2degree).ToString("G8"), GUIStyles.labelStyleLeft); } AutoGUI.AutoDrawObject(this); GUILayout.EndVertical(); GUI.DragWindow(); }
protected override void _drawGUI(int id) { GUILayout.BeginVertical(); AutoGUI.AutoDrawObject(trainer); for (int i = 0; i < trainer.tasks.Count; i++) { GUILayout.Space(8.0f); AutoGUI.AutoDrawObject(trainer.tasks[i]); LinApprox linmodel = trainer.tasks[i].linmodel; GUILayout.Label("linmodel:", GUIStyles.labelStyleLeft); GUILayout.Label(String.Join(",", linmodel.pars.Select(v => v.ToString("G5")).ToArray()), GUIStyles.labelStyleCenter); } GUILayout.EndVertical(); GUI.DragWindow(); }
protected override void _drawGUI(int id) { GUILayout.BeginVertical(); foreach (var module in gui_list) { bool is_shown = GUILayout.Toggle(module.IsShown(), module.ModuleName + " GUI", GUIStyles.toggleButtonStyle); if (is_shown) { module.ShowGUI(); } else { module.UnShowGUI(); } } GUILayout.Space(5.0f); AutoGUI.AutoDrawObject(this); GUILayout.EndVertical(); GUI.DragWindow(); }
protected override void _drawGUI(int id) { close_button(); GUILayout.BeginVertical(); // cruise flight control modes LevelFlightMode = GUILayout.Toggle(LevelFlightMode, "Level", GUIStyles.toggleButtonStyle); GUILayout.Space(5.0f); CourseHoldMode = GUILayout.Toggle(CourseHoldMode, "Heading", GUIStyles.toggleButtonStyle); GUILayout.BeginHorizontal(); GUILayout.Label("desired course", GUIStyles.labelStyleLeft); desired_course.DisplayLayout(GUIStyles.textBoxStyle); GUILayout.EndHorizontal(); GUILayout.Space(5.0f); string waypoint_btn_str; if (WaypointMode) { waypoint_btn_str = "WPT " + (dist_to_dest / 1000.0).ToString("#0.0") + " km"; } else { waypoint_btn_str = "Waypoint"; } WaypointMode = GUILayout.Toggle(WaypointMode, waypoint_btn_str, GUIStyles.toggleButtonStyle); GUILayout.BeginHorizontal(); GUILayout.Label("map:", GUIStyles.labelStyleRight); if (GUILayout.Button("Pick", GUIStyles.toggleButtonStyle) && !picking_waypoint) { if (this.Active) { start_picking_waypoint(); } else { MessageManager.post_quick_message("Can't pick waypoint when the Cruise Flight controller is disabled"); } } GUILayout.Label("from:", GUIStyles.labelStyleRight); if (GUILayout.Button("Tgt", GUIStyles.toggleButtonStyle)) { if (this.Active) { select_target(); } else { MessageManager.post_quick_message("Can't select target when the Cruise Flight controller is disabled"); } } if (GUILayout.Button("Wpt", GUIStyles.toggleButtonStyle)) { if (this.Active) { select_waypoint(); } else { MessageManager.post_quick_message("Can't select waypoint when the Cruise Flight controller is disabled"); } } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); desired_latitude.DisplayLayout(GUIStyles.textBoxStyle); //, GUILayout.Width(60.0f)); desired_longitude.DisplayLayout(GUIStyles.textBoxStyle); //, GUILayout.Width(60.0f)); GUILayout.EndHorizontal(); GUILayout.Space(10.0f); // speed thrust_c.SpeedCtrlGUIBlock(); GUILayout.Space(10.0f); // vertical motion vertical_control = GUILayout.Toggle(vertical_control, "Vertical motion", GUIStyles.toggleButtonStyle); GUILayout.BeginHorizontal(); GUILayout.BeginVertical(); AltitudeMode = GUILayout.Toggle(AltitudeMode, "Altitude", GUIStyles.toggleButtonStyle); // GUILayout.Width(90.0f) desired_altitude.DisplayLayout(GUIStyles.textBoxStyle); // GUILayout.Width(90.0f) GUILayout.EndVertical(); GUILayout.BeginVertical(); VerticalSpeedMode = GUILayout.Toggle(VerticalSpeedMode, "Vertical speed", GUIStyles.toggleButtonStyle); desired_vertspeed.DisplayLayout(GUIStyles.textBoxStyle); GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.Space(10.0f); // status //GUILayout.Label("Status", GUIStyles.labelStyleCenter); //GUILayout.BeginHorizontal(); //GUILayout.BeginVertical(); //GUILayout.Label("Latitude", GUIStyles.labelStyleCenter); //GUILayout.Label(vessel.latitude.ToString("G6"), GUIStyles.labelStyleCenter); //GUILayout.EndVertical(); //GUILayout.BeginVertical(); //GUILayout.Label("Longitude", GUIStyles.labelStyleCenter); //GUILayout.Label(vessel.longitude.ToString("G7"), GUIStyles.labelStyleCenter); //GUILayout.EndVertical(); //GUILayout.BeginVertical(); //if (WaypointMode) //{ // GUILayout.Label("Dist (km)", GUIStyles.labelStyleCenter); // GUILayout.Label((dist_to_dest / 1000.0).ToString("#0.0"), GUIStyles.labelStyleCenter); //} //else //{ // GUILayout.Label("Alt (m)", GUIStyles.labelStyleCenter); // GUILayout.Label(vessel.altitude.ToString("G5") + " m", GUIStyles.labelStyleCenter); //} //GUILayout.EndVertical(); //GUILayout.EndHorizontal(); //GUILayout.Space(10.0f); // advanced options bool adv_o = advanced_options; advanced_options = GUILayout.Toggle(advanced_options, "Advanced options", GUIStyles.toggleButtonStyle); if (advanced_options) { GUILayout.Space(5.0f); AutoGUI.AutoDrawObject(this); } else if (adv_o) { window.height = 100.0f; } GUILayout.EndVertical(); GUI.DragWindow(); }