Fixed the Application Launcher button in the VAB/SPH by making use of the new AppLauncherButton wrapper class.
[VesselSimulator.git] / KerbalEngineer / Editor / BuildAppLauncher.cs
blob:a/KerbalEngineer/Editor/BuildAppLauncher.cs -> blob:b/KerbalEngineer/Editor/BuildAppLauncher.cs
--- a/KerbalEngineer/Editor/BuildAppLauncher.cs
+++ b/KerbalEngineer/Editor/BuildAppLauncher.cs
@@ -48,19 +48,11 @@
             if (EditorLogic.RootPart != null)
             {
                 // set button state based on existing visibility
-                if (BuildAdvanced.Instance.Visible)
-                {
-                    SetState(ButtonState.On);
-                }
-                else
-                {
-                    SetState(ButtonState.Off);
-                }
+                IsOn = BuildAdvanced.Instance.Visible;
             }
             else
             {
-                // disable button
-                SetState(ButtonState.Disabled);
+                Disable();
             }
         }
     }