Example #1
0
 void Update()
 {
     if (configWindow.IsVisible() && configWindow.Contains(Event.current.mousePosition))
     {
         if (InputLockManager.GetControlLock(lockName) != desiredLock)
         {
             InputLockManager.SetControlLock(desiredLock, lockName);
         }
     }
     else
     {
         if (InputLockManager.GetControlLock(lockName) == desiredLock)
         {
             InputLockManager.RemoveControlLock(lockName);
         }
     }
 }
        void Update()
        {
            const string       lockName    = "TACLS_SpaceCenterLock";
            const ControlTypes desiredLock = ControlTypes.KSC_FACILITIES;

            if (configWindow.IsVisible() && configWindow.Contains(Event.current.mousePosition))
            {
                if (InputLockManager.GetControlLock(lockName) != desiredLock)
                {
                    InputLockManager.SetControlLock(desiredLock, lockName);
                }
            }
            else
            {
                if (InputLockManager.GetControlLock(lockName) == desiredLock)
                {
                    InputLockManager.RemoveControlLock(lockName);
                }
            }
        }