Created basic prefab based in-flight Application Launcher button and menu. (still requires functionality implementation)
[VesselSimulator.git] / KerbalEngineer / AppLauncherButton.cs
blob:a/KerbalEngineer/AppLauncherButton.cs -> blob:b/KerbalEngineer/AppLauncherButton.cs
--- a/KerbalEngineer/AppLauncherButton.cs
+++ b/KerbalEngineer/AppLauncherButton.cs
@@ -77,6 +77,23 @@
                 m_Button.Enable();
             }
         }
+        
+        /// <summary>
+        ///     Gets the anchor position for pop-up content.
+        /// </summary>
+        public Vector3 GetAnchor()
+        {
+            if (m_Button == null)
+            {
+                return Vector3.zero;
+            }
+            
+            Vector3 anchor = m_Button.GetAnchor();
+
+            anchor.x -= 3.0f;
+
+            return anchor;
+        }
 
         /// <summary>
         ///     Enables and sets the button to off.