44#if ! DUMMY
55namespace ClickThroughFix
66{
7- [ KSPAddon ( KSPAddon . Startup . SpaceCentre , true ) ]
7+ //[KSPAddon(KSPAddon.Startup.SpaceCentre, true)]
8+ [ KSPAddon ( KSPAddon . Startup . EditorAny , false ) ]
89 class CBTMonitor : MonoBehaviour
910 {
1011 void Start ( )
1112 {
12- DontDestroyOnLoad ( this ) ;
13+ // DontDestroyOnLoad(this);
1314 // GameEvents.onGameSceneLoadRequested.Add(onGameSceneLoadRequested);
1415 ClickThruBlocker . CTBWin . activeBlockerCnt = 0 ;
1516 }
@@ -25,7 +26,9 @@ void onGameSceneLoadRequested(GameScenes gs)
2526 // the mouse moved over a protected window
2627 void Update ( )
2728 {
28- if ( HighLogic . CurrentGame == null || HighLogic . CurrentGame . Parameters . CustomParams < CTB > ( ) . focusFollowsclick )
29+ if ( HighLogic . CurrentGame == null ||
30+ HighLogic . CurrentGame . Parameters . CustomParams < CTB > ( ) . focusFollowsclick ) // ||
31+ //(!HighLogic.CurrentGame.Parameters.CustomParams<CTB>().focusFollowsclick && !HighLogic.LoadedSceneIsEditor))
2932 return ;
3033 {
3134 if ( ClickThruBlocker . CTBWin . activeBlockerCnt > 0 )
@@ -66,7 +69,9 @@ void Update()
6669 int d ;
6770 void LateUpdate ( )
6871 {
69- if ( HighLogic . CurrentGame == null || HighLogic . CurrentGame . Parameters . CustomParams < CTB > ( ) . focusFollowsclick )
72+ if ( HighLogic . CurrentGame == null ||
73+ HighLogic . CurrentGame . Parameters . CustomParams < CTB > ( ) . focusFollowsclick ) // ||
74+ //(!HighLogic.CurrentGame.Parameters.CustomParams<CTB>().focusFollowsclick && !HighLogic.LoadedSceneIsEditor))
7075 return ;
7176
7277 d = 0 ;
0 commit comments