Esempio n. 1
0
 private void OnGuiAppLauncherReady()
 {
     try
     {
         this.button = ApplicationLauncher.Instance.AddModApplication(
             this.OnTrue,
             this.OnFalse,
             this.OnHover,
             this.OnHoverOut,
             null,
             null,
             ApplicationLauncher.AppScenes.ALWAYS,
             GameDatabase.Instance.GetTexture("KerbalEngineer/Textures/ToolbarIcon", false));
         this.actionMenuGui = this.button.gameObject.AddComponent <ActionMenuGui>();
         this.actionMenuGui.transform.parent = this.button.transform;
         ApplicationLauncher.Instance.EnableMutuallyExclusive(this.button);
         GameEvents.onHideUI.Add(this.OnHide);
         GameEvents.onShowUI.Add(this.OnShow);
     }
     catch (Exception ex)
     {
         Logger.Exception(ex);
     }
 }
Esempio n. 2
0
 private void OnGuiAppLauncherReady()
 {
     try
     {
         this.button = ApplicationLauncher.Instance.AddModApplication(
             this.OnTrue,
             this.OnFalse,
             this.OnHover,
             this.OnHoverOut,
             null,
             null,
             ApplicationLauncher.AppScenes.ALWAYS,
             GameDatabase.Instance.GetTexture("KerbalEngineer/Textures/ToolbarIcon", false));
         this.actionMenuGui = this.button.gameObject.AddComponent<ActionMenuGui>();
         this.actionMenuGui.transform.parent = this.button.transform;
         ApplicationLauncher.Instance.EnableMutuallyExclusive(this.button);
         GameEvents.onHideUI.Add(this.OnHide);
         GameEvents.onShowUI.Add(this.OnShow);
     }
     catch (Exception ex)
     {
         Logger.Exception(ex);
     }
 }