public override bool Interactible(MemberInfo member, GameParameters parameters) { if (showPopup) { OneTimePopup.RemovePopUpFlagFile(); } return(true); }
void OnGameStateCreated(Game g) { bool b = false; if (OneTimePopup.GetGlobalDefault(ref b)) { g.Parameters.CustomParams <CTB>().focusFollowsclick = b; g.Parameters.CustomParams <CTB>().showPopup = false; OneTimePopup.CreatePopUpFlagFile(); } }
void OnGameNewStart() { bool b = false; if (OneTimePopup.GetGlobalDefault(ref b)) { HighLogic.CurrentGame.Parameters.CustomParams <CTB>().focusFollowsclick = b; HighLogic.CurrentGame.Parameters.CustomParams <CTB>().showPopup = false; OneTimePopup.CreatePopUpFlagFile(); } }
public void Awake() { //popUpShownCfgPath = Path.Combine( // Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "../PluginData/PopUpShown.cfg"); if (HighLogic.CurrentGame != curGame) { ClearInputLocks.focusFollowsclick = HighLogic.CurrentGame.Parameters.CustomParams <CTB>().focusFollowsclick; curGame = HighLogic.CurrentGame; } if (!HighLogic.CurrentGame.Parameters.CustomParams <CTB>().showPopup) { Destroy(this); } Instance = this; }
public override bool Interactible(MemberInfo member, GameParameters parameters) { if (oldFocusFollowsClick == null) { oldFocusFollowsClick = focusFollowsclick; } if (oldFocusFollowsClick != focusFollowsclick) { oldFocusFollowsClick = focusFollowsclick; showPopup = false; } if (showPopup && OneTimePopup.Instance != null) { OneTimePopup.RemovePopUpFlagFile(); } return(true); }
void OnDestroy() { Instance = null; }