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: 71cb0ebb47ea
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 485c0c60ea47
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on May 25, 2019

  1. Copy the full SHA
    a86c438 View commit details
  2. Merge pull request #2177 from pleroy/2169

    Multiline label in the frame selector
    pleroy authored May 25, 2019
    Copy the full SHA
    485c0c6 View commit details
Showing with 11 additions and 3 deletions.
  1. +3 −3 ksp_plugin_adapter/reference_frame_selector.cs
  2. +8 −0 ksp_plugin_adapter/style.cs
6 changes: 3 additions & 3 deletions ksp_plugin_adapter/reference_frame_selector.cs
Original file line number Diff line number Diff line change
@@ -307,10 +307,10 @@ protected override void RenderWindow(int window_id) {
using (new UnityEngine.GUILayout.VerticalScope()) {
if (target_override) {
UnityEngine.GUILayout.Label(
"Using target-centred frame selected on navball speed display",
GUILayoutWidth(6));
UnityEngine.GUILayout.Label(
"Using target-centred frame selected on navball speed " +
"display\n\n" +
Description(frame_type, selected_celestial, target_override),
Style.Multiline(UnityEngine.GUI.skin.label),
GUILayoutWidth(6));
} else {
TypeSelector(FrameType.BODY_SURFACE);
8 changes: 8 additions & 0 deletions ksp_plugin_adapter/style.cs
Original file line number Diff line number Diff line change
@@ -39,6 +39,14 @@ public static UnityEngine.GUIStyle RightAligned(UnityEngine.GUIStyle style) {
return right_aligned_style;
}

public static UnityEngine.GUIStyle Multiline(UnityEngine.GUIStyle style) {
var multiline_style = new UnityEngine.GUIStyle(style);
multiline_style.alignment = UnityEngine.TextAnchor.UpperLeft;
multiline_style.fixedHeight = 0;
multiline_style.wordWrap = true;
return multiline_style;
}

public static void HorizontalLine() {
var horizontal_line_style = new UnityEngine.GUIStyle
(UnityEngine.GUI.skin.horizontalSlider);