Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 97a9607a587e
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 23a7c9490223
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Apr 23, 2019

  1. Copy the full SHA
    9f5b3fe View commit details

Commits on Apr 24, 2019

  1. Merge pull request #2142 from pleroy/Shrink

    Fix a misplaced Shrink that was causing horrible UI flicker
    pleroy authored Apr 24, 2019
    Copy the full SHA
    23a7c94 View commit details
Showing with 8 additions and 1 deletion.
  1. +8 −1 ksp_plugin_adapter/main_window.cs
9 changes: 8 additions & 1 deletion ksp_plugin_adapter/main_window.cs
Original file line number Diff line number Diff line change
@@ -189,6 +189,7 @@ protected override void RenderWindow(int window_id) {
"{0:0.00e00} s");
if (MapView.MapIsEnabled &&
FlightGlobals.ActiveVessel?.orbitTargeter != null) {
show_selection_ui = true;
using (new UnityEngine.GUILayout.HorizontalScope()) {
selecting_active_vessel_target = UnityEngine.GUILayout.Toggle(
selecting_active_vessel_target, "Select target vessel...");
@@ -213,6 +214,11 @@ protected override void RenderWindow(int window_id) {
}
}
} else {
// This will remove the "Select" UI so it must shrink.
if (show_selection_ui) {
show_selection_ui = false;
Shrink();
}
selecting_active_vessel_target = false;
}
if (plugin != IntPtr.Zero) {
@@ -229,7 +235,6 @@ protected override void RenderWindow(int window_id) {
show : ref show_logging_settings_,
render : RenderLoggingSettings);
}
Shrink();
UnityEngine.GUI.DragWindow();
}

@@ -471,6 +476,8 @@ private void RenderToggleableSection(String name,
private bool show_logging_settings_ = false;
private bool show_prediction_settings_ = true;

private bool show_selection_ui = false;

private bool should_load_compatibility_data_ = true;
private int prediction_length_tolerance_index_ =
default_prediction_length_tolerance_index_;