From 19df073ccb0ca0c63f7e59e85e735d037568fc08 Mon Sep 17 00:00:00 2001 From: Charon77 Date: Mon, 28 Dec 2015 22:04:55 +0700 Subject: [PATCH] Initial commit --- .../Flight/Readouts/Rendezvous/TargetSelector.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/KerbalEngineer/Flight/Readouts/Rendezvous/TargetSelector.cs b/KerbalEngineer/Flight/Readouts/Rendezvous/TargetSelector.cs index 0213661a..e32c9182 100644 --- a/KerbalEngineer/Flight/Readouts/Rendezvous/TargetSelector.cs +++ b/KerbalEngineer/Flight/Readouts/Rendezvous/TargetSelector.cs @@ -29,6 +29,7 @@ namespace KerbalEngineer.Flight.Readouts.Rendezvous { public class TargetSelector : ReadoutModule { + #region Fields private string searchQuery = string.Empty; @@ -38,6 +39,7 @@ public class TargetSelector : ReadoutModule private float typeButtonWidth; private bool typeIsBody; private bool usingSearch; + private bool displayDebrisAndFlags = false; private VesselType vesselType = VesselType.Unknown; #endregion @@ -194,6 +196,8 @@ private void DrawSearch() this.usingSearch = false; this.ResizeRequested = true; } + + this.displayDebrisAndFlags = GUILayout.Toggle(this.displayDebrisAndFlags,"Show All", this.ButtonStyle,GUILayout.Width(60.0f * GuiDisplaySize.Offset)); GUILayout.EndHorizontal(); } @@ -335,6 +339,12 @@ private int DrawVessels() continue; } + //Ignores Debris and Flags on search bar + if (this.searchQuery.Length != 0 && !displayDebrisAndFlags && (vessel.vesselType == VesselType.Debris || vessel.vesselType == VesselType.Flag)) + { + continue; + } + if (this.searchQuery.Length == 0) { count++;