예제 #1
0
 internal Kerbal_Construction_Time()
 {
     instance = this;
     if (ToolbarManager.ToolbarAvailable && ToolbarManager.Instance != null)
     {
         KCTDebug.Log("Adding Toolbar Button");
         KCT_GameStates.kctToolbarButton = ToolbarManager.Instance.add("Kerbal_Construction_Time", "MainButton");
         if (KCT_GameStates.kctToolbarButton != null)
         {
             if (!KCT_GameStates.settings.enabledForSave)
             {
                 KCT_GameStates.kctToolbarButton.Visibility = new GameScenesVisibility(GameScenes.SPACECENTER);
             }
             else
             {
                 KCT_GameStates.kctToolbarButton.Visibility = new GameScenesVisibility(new GameScenes[] { GameScenes.SPACECENTER, GameScenes.FLIGHT, GameScenes.TRACKSTATION, GameScenes.EDITOR, GameScenes.SPH });
             }
             KCT_GameStates.kctToolbarButton.TexturePath = KCT_Utilities.GetButtonTexture();
             KCT_GameStates.kctToolbarButton.ToolTip     = "Kerbal Construction Time";
             KCT_GameStates.kctToolbarButton.OnClick    += ((e) =>
             {
                 KCT_GUI.onClick();
             });
         }
     }
 }