Beispiel #1
0
        /// <summary>Called by Unity when plugin is unloaded</summary>
        public void OnDestroy()
        {
            Debug.Log("[Kerbulator] Destroy");
            if (gui != null)
            {
                gui.OnDestroy();
            }
            gui = null;

            RemoveToolbarButton();
        }
Beispiel #2
0
        /// <summary>Called by Unity when the Plugin is loaded</summary>
        void Awake()
        {
            Debug.Log("[Kerbulator] Start");
            options = LoadConfig();
            gui     = new KerbulatorGUI(this, false, false, options);

            if (!ToolbarManager.ToolbarAvailable)
            {
                GameEvents.onGUIApplicationLauncherReady.Add(InitToolbarButton);
                GameEvents.onGUIApplicationLauncherUnreadifying.Add(OnGuiApplicationLauncherUnreadifying);
            }

            Debug.Log("[Kerbulator] Start done");
        }
Beispiel #3
0
        /// <summary>Called by Unity when the Plugin is started</summary>
        void Start()
        {
            if (ToolbarManager.ToolbarAvailable)
            {
                mainWindowEnabled      = false;
                mainButton             = ToolbarManager.Instance.add("Kerbulator", "Kerbulator");
                mainButton.TexturePath = "Kerbulator/Textures/kerbulator";
                mainButton.ToolTip     = "Open a powerful calculator";
                mainButton.Visibility  = new GameScenesVisibility(GameScenes.FLIGHT);
                mainButton.OnClick    += (e) => {
                    gui.ChangeState(!mainWindowEnabled);
                };
            }

            gui = new KerbulatorGUI(this, false, !ToolbarManager.ToolbarAvailable);
        }
Beispiel #4
0
 /// <summary>Called by Unity when the Plugin is started</summary>
 void Awake()
 {
     options = new KerbulatorOptions();
     gui     = new KerbulatorGUI(this, true, true, options);
 }
Beispiel #5
0
 /// <summary>Called by Unity when the Plugin is started</summary>
 void Start()
 {
     gui = new KerbulatorGUI(this, true, true);
 }
Beispiel #6
0
        /// <summary>Called by Unity when the Plugin is started</summary>
        void Start()
        {
            if(ToolbarManager.ToolbarAvailable) {
                mainWindowEnabled = false;
                mainButton = ToolbarManager.Instance.add("Kerbulator", "Kerbulator");
                mainButton.TexturePath = "Kerbulator/Textures/kerbulator";
                mainButton.ToolTip = "Open a powerful calculator";
                mainButton.Visibility = new GameScenesVisibility(GameScenes.FLIGHT);
                mainButton.OnClick += (e) => {
                    gui.ChangeState(!mainWindowEnabled);
                };
            }

            gui = new KerbulatorGUI(this, false, !ToolbarManager.ToolbarAvailable);
        }
Beispiel #7
0
 /// <summary>Called by Unity when the Plugin is started</summary>
 void Start()
 {
     gui = new KerbulatorGUI(this, true, true);
 }