Skip to content

Commit

Permalink
1.1.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbudda committed Oct 16, 2018
1 parent e4d8370 commit b96e997
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 17 deletions.
Binary file modified Assets/Plugins/KerbalEngineer.Unity.dll
Binary file not shown.
6 changes: 6 additions & 0 deletions Documents/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
1.1.5.4, 2018-10-15, KSP 1.5.0 #2332
- Version bump for 1.5.0
- VAB bottom overlay respects KER Gui Size setting
- VAB bottom overlay can be moved left and right in the setting menu
- Minor bugfixes

1.1.5.3, 2018-7-27, KSP 1.4.5 #2243
- Total overhaul of impact and suicide burn calculations.
- Added impact marker to map and flight view. Toggleable via the Impact Marker readout button.
Expand Down
16 changes: 16 additions & 0 deletions KerbalEngineer/Editor/BuildAdvanced.cs
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,22 @@ private void DrawSettings()
}
GUILayout.EndHorizontal();

GUILayout.BeginHorizontal();
GUILayout.Label("VAB Overlay X Pos.: " + BuildOverlay.BuildOverlayVessel.WindowX, settingStyle);
if (GUILayout.Button("<<", buttonStyle, GUILayout.Width(50 * GuiDisplaySize.Offset))) {
BuildOverlay.BuildOverlayVessel.WindowX-=10;
}
if (GUILayout.Button("<", buttonStyle, GUILayout.Width(50 * GuiDisplaySize.Offset))) {
BuildOverlay.BuildOverlayVessel.WindowX--;
}
if (GUILayout.Button(">", buttonStyle, GUILayout.Width(50 * GuiDisplaySize.Offset))) {
BuildOverlay.BuildOverlayVessel.WindowX++;
}
if (GUILayout.Button(">>", buttonStyle, GUILayout.Width(50 * GuiDisplaySize.Offset))) {
BuildOverlay.BuildOverlayVessel.WindowX+=10;
}
GUILayout.EndHorizontal();

GUILayout.Label("Minimum delay between simulations: " + SimManager.minSimTime.TotalMilliseconds + "ms", settingStyle);
GUI.skin = HighLogic.Skin;
SimManager.minSimTime = TimeSpan.FromMilliseconds(GUILayout.HorizontalSlider((float)SimManager.minSimTime.TotalMilliseconds, 0, 2000.0f));
Expand Down
28 changes: 20 additions & 8 deletions KerbalEngineer/Editor/BuildOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ public static GUIStyle NameStyle
{
get
{
return nameStyle ?? (nameStyle = new GUIStyle
return (nameStyle !=null && !hasChanged) ? nameStyle : (nameStyle = new GUIStyle
{
normal =
{
textColor = Color.white
},
fontSize = 11,
fontSize = (int)(11 * GuiDisplaySize.Offset),
fontStyle = FontStyle.Bold,
alignment = TextAnchor.UpperLeft,
stretchWidth = true
Expand All @@ -105,7 +105,7 @@ public static GUIStyle TabStyle
{
get
{
return tabStyle ?? (tabStyle = new GUIStyle
return (tabStyle !=null & !hasChanged) ? tabStyle : (tabStyle = new GUIStyle
{
normal =
{
Expand All @@ -128,7 +128,7 @@ public static GUIStyle TabStyle
textColor = Color.yellow
},
padding = new RectOffset(20, 20, 0, 0),
fontSize = 11,
fontSize = (int)(11 * GuiDisplaySize.Offset),
fontStyle = FontStyle.Bold,
alignment = TextAnchor.MiddleCenter,
fixedHeight = 15.0f,
Expand All @@ -141,30 +141,36 @@ public static GUIStyle TitleStyle
{
get
{
return titleStyle ?? (titleStyle = new GUIStyle
return (titleStyle != null && !hasChanged ) ? titleStyle : (titleStyle = new GUIStyle
{
normal =
{
textColor = Color.yellow
},
fontSize = 11,
fontSize = (int)(11 * GuiDisplaySize.Offset),
fontStyle = FontStyle.Bold,
stretchWidth = true
});
}
}

private static bool hasChanged;

protected void OnGUI() {
// hasChanged = false;
}

public static GUIStyle ValueStyle
{
get
{
return valueStyle ?? (valueStyle = new GUIStyle
return (valueStyle !=null && !hasChanged) ? valueStyle : (valueStyle = new GUIStyle
{
normal =
{
textColor = Color.white
},
fontSize = 11,
fontSize = (int)(11 * GuiDisplaySize.Offset),
fontStyle = FontStyle.Normal,
alignment = TextAnchor.UpperRight,
stretchWidth = true
Expand Down Expand Up @@ -235,13 +241,18 @@ protected void Awake()
buildOverlayVessel = this.gameObject.AddComponent<BuildOverlayVessel>();
buildOverlayResources = this.gameObject.AddComponent<BuildOverlayResources>();
Load();
GuiDisplaySize.OnSizeChanged += OnSizeChanged;
}
catch (Exception ex)
{
MyLogger.Exception(ex);
}
}

private void OnSizeChanged() {
hasChanged = true;
}

protected void OnDestroy()
{
try
Expand All @@ -259,6 +270,7 @@ protected void OnDestroy()
{
Destroy(buildOverlayResources);
}
GuiDisplaySize.OnSizeChanged -= OnSizeChanged;
}
catch (Exception ex)
{
Expand Down
2 changes: 1 addition & 1 deletion KerbalEngineer/EngineerGlobals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class EngineerGlobals
/// <summary>
/// Current version of the Kerbal Engineer assembly.
/// </summary>
public const string ASSEMBLY_VERSION = "1.1.5.3";
public const string ASSEMBLY_VERSION = "1.1.5.4";

private static string assemblyFile;
private static string assemblyName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ public void Update() {
vessel = TrackingStationSource.GetVessel();
else
TrackingStationSource = target;

}

activeTarget = target;
Expand Down Expand Up @@ -312,8 +311,7 @@ public void Update() {
targetOrbit = actualTargetOrbit;
originOrbit = null;
}



{ //These are not 'rendezvous' calculations, just raw data about the target object.
AltitudeSeaLevel = targetOrbit.altitude;
ApoapsisHeight = targetOrbit.ApA;
Expand Down
2 changes: 1 addition & 1 deletion KerbalEngineer/Flight/Readouts/Surface/ImpactProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ private double getBrakingDistanceForDT(global::Vessel vessel, double t, Celestia
public static bool ShowMarker = true;

public static void drawImpact(Color color) {
if (ShowDetails && ShowMarker)
if (ShowDetails && ShowMarker && FlightGlobals.fetch !=null && FlightGlobals.ActiveVessel != null && FlightGlobals.ActiveVessel.mainBody != null )
Drawing.DebugDrawing.DrawGroundMarker(FlightGlobals.ActiveVessel.mainBody, Latitude, Longitude, color, MapView.MapIsEnabled, 0, 0);
}

Expand Down
Binary file modified Output/KerbalEngineer/KerbalEngineer.Unity.dll
Binary file not shown.
Binary file modified Output/KerbalEngineer/KerbalEngineer.dll
Binary file not shown.
8 changes: 4 additions & 4 deletions Output/KerbalEngineer/KerbalEngineer.version
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"MAJOR":1,
"MINOR":1,
"PATCH":5,
"BUILD":3
"BUILD":4
},
"KSP_VERSION":
{
"MAJOR":1,
"MINOR":4,
"PATCH":5
"MINOR":5,
"PATCH":0
},
"KSP_VERSION_MIN":
{
Expand All @@ -24,7 +24,7 @@
"KSP_VERSION_MAX":
{
"MAJOR":1,
"MINOR":4,
"MINOR":5,
"PATCH":9
}
}

0 comments on commit b96e997

Please sign in to comment.