diff --git a/src/Targetron.cs b/src/Targetron.cs index ab45885..fd12481 100644 --- a/src/Targetron.cs +++ b/src/Targetron.cs @@ -47,8 +47,8 @@ public class Targetron : MonoBehaviour private static readonly Texture2D buttonDistDesc = new Texture2D(16, 16); //Filters - private static List filters = new List(10); - private static List vesselTypes = new List(10); + private static List filters = new List(12); + private static List vesselTypes = new List(12); //GUI Styles private static readonly Texture2D contextBGN = new Texture2D(1, 1); @@ -176,7 +176,7 @@ public void Start() ToolbarButton.ToolTip = "Targetron " + VERSION; ToolbarButton.TexturePath = "Targetron/Icons/targetron"; ToolbarButton.Visibility = new GameScenesVisibility(GameScenes.FLIGHT); - ToolbarButton.OnClick += e => toggleOn = !toggleOn; + ToolbarButton.OnClick += e => Toggle(); } private void saveConfig(Vessel data) @@ -440,7 +440,7 @@ private void OnDraw() } else if (contextActive != null && activeDockingNode != null && activeDockingNode.part.highlightType == Part.HighlightType.Disabled) activeDockingNode.part.SetHighlight(true); - + if (lastActiveDockingNode != null && (contextActive == null || activeDockingNode == null || !lastActiveDockingNode.Equals(activeDockingNode))) { lastActiveDockingNode.part.SetHighlight(false); @@ -765,6 +765,8 @@ private void drawTargeter(int windowID) GUILayout.EndHorizontal(); top += 24; } + // Ugly workaround for don't cut off the last entry in the target list + top += 12; // For testing purposes /* for (int i = 0; i < 50; i++) {