Skip to content

Commit

Permalink
Updated target marker to be closer to over target
Browse files Browse the repository at this point in the history
  • Loading branch information
icedown committed Sep 2, 2016
1 parent 7733398 commit 01de641
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CactEye2/TelescopeMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,12 @@ private void DrawTargetPointer()
if (FlightGlobals.fetch.VesselTarget != null)
{
string targetName = FlightGlobals.fetch.VesselTarget.GetName();
Vector2 vec = GetTargetPos(FlightGlobals.fetch.VesselTarget.GetTransform().position, ScopeRect.width);
Vector2 vec = GetTargetPos(FlightGlobals.fetch.VesselTarget.GetTransform().transform.position, ScopeRect.width);

if (vec.x > 16 && vec.y > 16 && vec.x < ScopeRect.width - 16 && vec.y < ScopeRect.height - 16)
{
GUI.DrawTexture(new Rect(vec.x + ScopeRect.xMin - 16, vec.y + ScopeRect.yMin - 16, 32, 32), TargetPointerTexture);
// GUI.DrawTexture(new Rect(vec.x + ScopeRect.xMin - 16, vec.y + ScopeRect.yMin - 16, 32, 32), TargetPointerTexture);
GUI.DrawTexture(new Rect(vec.x + ScopeRect.xMin - 16, vec.y + ScopeRect.yMin - 32, 32, 32), TargetPointerTexture);
Vector2 size = GUI.skin.GetStyle("Label").CalcSize(new GUIContent(targetName));
if (vec.x > 0.5 * size.x && vec.x < ScopeRect.width - (0.5 * size.x) && vec.y < ScopeRect.height - 16 - size.y)
{
Expand Down

0 comments on commit 01de641

Please sign in to comment.