Пример #1
0
 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();
            }
        }
Пример #4
0
 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;
 }
Пример #5
0
        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);
        }
Пример #6
0
 void OnDestroy()
 {
     Instance = null;
 }