Skip to content

Commit

Permalink
minor tweaks, don't cut last entry in the list when using the scrollbar.
Browse files Browse the repository at this point in the history
  • Loading branch information
hashashin committed Apr 30, 2017
1 parent 6c17d8b commit fe3bb26
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Targetron.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public class Targetron : MonoBehaviour
private static readonly Texture2D buttonDistDesc = new Texture2D(16, 16);

//Filters
private static List<Filter> filters = new List<Filter>(10);
private static List<VesselType> vesselTypes = new List<VesselType>(10);
private static List<Filter> filters = new List<Filter>(12);
private static List<VesselType> vesselTypes = new List<VesselType>(12);

//GUI Styles
private static readonly Texture2D contextBGN = new Texture2D(1, 1);
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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++)
{
Expand Down

0 comments on commit fe3bb26

Please sign in to comment.