GetStockSections has been made interface only, like the GetCustomSections function that returns a list of ISectionModule. Also added missing null check (should never be encountered but no harm in having robust code).
[VesselSimulator.git] / KerbalEngineer / Flight / FlightAppLauncher.cs
blob:a/KerbalEngineer/Flight/FlightAppLauncher.cs -> blob:b/KerbalEngineer/Flight/FlightAppLauncher.cs
--- a/KerbalEngineer/Flight/FlightAppLauncher.cs
+++ b/KerbalEngineer/Flight/FlightAppLauncher.cs
@@ -44,6 +44,14 @@
         }
 
         /// <summary>
+        ///     Applies the KSP theme to a game object and its children.
+        /// </summary>
+        public void ApplyTheme(GameObject gameObject)
+        {
+            StyleManager.Process(gameObject);
+        }
+
+        /// <summary>
         ///     Clamps the given rect transform within the screen bounds.
         /// </summary>
         public void ClampToScreen(RectTransform rectTransform)
@@ -208,6 +216,8 @@
                 return;
             }
 
+            StyleManager.Process(m_MenuObject);
+
             // set object as a child of the main canvas
             m_MenuObject.transform.SetParent(MainCanvasUtil.MainCanvas.transform);