protected virtual void TogglePointerCursor(VRTK_BasePointerRenderer pointerRenderer, bool state)
 {
     if (hidePointerCursorOnHover)
     {
         if (!state)
         {
             storedCursorState = pointerRenderer.cursorVisibility;
             pointerRenderer.cursorVisibility = VRTK_BasePointerRenderer.VisibilityStates.AlwaysOff;
         }
         else
         {
             pointerRenderer.cursorVisibility = storedCursorState;
         }
     }
 }
Exemple #2
0
        protected virtual void ToggleCursor(object sender, bool state)
        {
            if (hidePointerCursorOnHover && sender.GetType().Equals(typeof(VRTK_Pointer)))
            {
                VRTK_Pointer pointer = (VRTK_Pointer)sender;

                if (!state)
                {
                    storedCursorState = pointer.pointerRenderer.cursorVisibility;
                    pointer.pointerRenderer.cursorVisibility = VRTK_BasePointerRenderer.VisibilityStates.AlwaysOff;
                }
                else
                {
                    pointer.pointerRenderer.cursorVisibility = storedCursorState;
                }
            }
        }
Exemple #3
0
 // Token: 0x06001896 RID: 6294 RVA: 0x00082A64 File Offset: 0x00080C64
 protected virtual void ToggleElement(GameObject givenObject, bool pointerState, bool actualState, VRTK_BasePointerRenderer.VisibilityStates givenVisibility, ref bool currentVisible)
 {
     if (givenObject != null)
     {
         currentVisible = (givenVisibility == VRTK_BasePointerRenderer.VisibilityStates.AlwaysOn || pointerState);
         givenObject.SetActive(currentVisible);
         if (givenVisibility == VRTK_BasePointerRenderer.VisibilityStates.AlwaysOff)
         {
             currentVisible = false;
             this.ToggleRendererVisibility(givenObject, false);
             return;
         }
         if (actualState && givenVisibility != VRTK_BasePointerRenderer.VisibilityStates.AlwaysOn)
         {
             this.ToggleRendererVisibility(givenObject, false);
             this.AddVisibleRenderer(givenObject);
             return;
         }
         this.ToggleRendererVisibility(givenObject, true);
     }
 }