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); } }
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); } }