Esempio n. 1
0
    // Token: 0x06005612 RID: 22034 RVA: 0x001DA588 File Offset: 0x001D8988
    private void Update()
    {
        if (!VRCApplicationSetup.IsVRSDKInitialized)
        {
            return;
        }
        bool flag = VRCInputManager.IsUsingHandController();

        foreach (VRCInput vrcinput in this.inputs)
        {
            vrcinput.Reset();
        }
        foreach (KeyValuePair <VRCInputManager.InputMethod, VRCInputProcessor> keyValuePair in VRCInputManager.inputProcessors)
        {
            if (keyValuePair.Key != VRCInputManager.InputMethod.Keyboard || !VRCInputManager._useKeyboardOnlyForText)
            {
                if (keyValuePair.Value.enabled && keyValuePair.Value.inputEnabled)
                {
                    keyValuePair.Value.Apply();
                }
            }
        }
        foreach (KeyValuePair <VRCInputManager.InputMethod, VRCInputProcessor> keyValuePair2 in VRCInputManager.inputProcessors)
        {
            if (keyValuePair2.Value.AnyKey())
            {
                VRCInputManager._lastInputMethod = keyValuePair2.Key;
            }
        }
        if (VRCInputManager.IsUsingHandController() != flag)
        {
            this.OnPlayerUsingHandControllersChanged(VRCInputManager.IsUsingHandController());
        }
    }
Esempio n. 2
0
 // Token: 0x06005561 RID: 21857 RVA: 0x001D74C4 File Offset: 0x001D58C4
 private void ShowUISelectTooltip(string id, bool rightHand)
 {
     if (VRCInputManager.IsUsingHandController())
     {
         this.ActivateControllerLabel(id, (!rightHand) ? ControllerHand.Left : ControllerHand.Right, ControllerInputUI.Trigger, "Aim At Player And Press To Select", -1f, -1);
     }
     else
     {
         this.ActivateObjectLabel(null, id, TutorialLabelType.PopupAttached, ControllerHand.None, "Aim At Player And Press To Select", ControllerActionUI.UISelect, string.Empty, ControllerActionUI.None, -1f, -1, AttachMode.PositionOnly, true);
     }
 }
Esempio n. 3
0
 // Token: 0x0600554B RID: 21835 RVA: 0x001D6974 File Offset: 0x001D4D74
 public void PickupSelected(VRC_Pickup pickup, bool leftHand)
 {
     if (pickup.currentlyHeldBy != null)
     {
         return;
     }
     if (VRCInputManager.IsUsingHandController())
     {
         ControllerInputUI controllerPart = (VRCInputManager.LastInputMethod != VRCInputManager.InputMethod.Oculus) ? ControllerInputUI.Trigger : ControllerInputUI.Grip;
         this.ActivateControllerLabel((!leftHand) ? ControllerHand.Right : ControllerHand.Left, controllerPart, (!VRCHandGrasper.IsAutoEquipPickup(pickup)) ? "Hold to Grab" : "Equip", 0.1f, 0);
     }
     else if (!this.IsShowingOtherLabelOfType(TutorialLabelType.Pickup, pickup.transform))
     {
         this.ActivateObjectLabel(pickup.transform, TutorialLabelType.Pickup, (!leftHand) ? ControllerHand.Right : ControllerHand.Left, (!VRCInputManager.IsUsingAutoEquipControllerType() || !VRCHandGrasper.IsAutoEquipPickup(pickup)) ? "Hold to Grab" : "Equip", ControllerActionUI.Use, 0.1f, 0, AttachMode.PositionOnly, false);
     }
 }
Esempio n. 4
0
    // Token: 0x06005AC4 RID: 23236 RVA: 0x001FA784 File Offset: 0x001F8B84
    private IEnumerator ShowGetUpInstructions()
    {
        yield return(new WaitForSeconds(0.1f));

        if (this.Occupant != null)
        {
            if (VRCInputManager.IsUsingHandController())
            {
                TutorialManager.Instance.ActivateControllerLabel(ControllerHand.Left, ControllerInputUI.TrackpadTop, "Get Up", 10f, 0);
            }
            else
            {
                TutorialManager.Instance.ActivateObjectLabel(null, TutorialLabelType.Popup, ControllerHand.None, "Get Up", ControllerActionUI.Move, string.Empty, ControllerActionUI.None, 10f, 0, AttachMode.PositionOnly, true);
            }
        }
        yield break;
    }
Esempio n. 5
0
    // Token: 0x0600554A RID: 21834 RVA: 0x001D688C File Offset: 0x001D4C8C
    public void InteractableSelected(VRC_Interactable[] interactable, Component useComponent, bool leftHand)
    {
        string text = (interactable == null || interactable.Length <= 0 || string.IsNullOrEmpty(interactable[0].interactText)) ? "Use" : interactable[0].interactText;

        if (text.CompareTo("Use") == 0 && useComponent.GetComponent <VRC_Station>() != null)
        {
            text = "Sit";
        }
        if (!this.IsShowingOtherLabelOfType(TutorialLabelType.Interactable, useComponent.transform))
        {
            this.ActivateObjectLabel(useComponent.transform, TutorialLabelType.Interactable, (!leftHand) ? ControllerHand.Right : ControllerHand.Left, text, (!VRCInputManager.IsUsingHandController()) ? ControllerActionUI.Use : ControllerActionUI.None, 0.1f, 0, AttachMode.PositionOnly, false);
        }
        if (VRCInputManager.IsUsingHandController())
        {
            ControllerInputUI controllerPart = (VRCInputManager.LastInputMethod != VRCInputManager.InputMethod.Oculus) ? ControllerInputUI.Trigger : ControllerInputUI.Grip;
            this.ActivateControllerLabel((!leftHand) ? ControllerHand.Right : ControllerHand.Left, controllerPart, text, 0.1f, 0);
        }
    }
Esempio n. 6
0
 // Token: 0x06005560 RID: 21856 RVA: 0x001D7448 File Offset: 0x001D5848
 private void ShowOpenMenuTooltip(string id)
 {
     if (VRCInputManager.IsUsingHandController())
     {
         if (VRCInputManager.LastInputMethod == VRCInputManager.InputMethod.Vive)
         {
             this.ActivateControllerLabel(id, ControllerHand.Left, ControllerInputUI.MenuButton, "Open Menu", -1f, -1);
         }
         if (VRCInputManager.LastInputMethod == VRCInputManager.InputMethod.Oculus)
         {
             this.ActivateControllerLabel(id, ControllerHand.Left, ControllerInputUI.ButtonTwo, "Open Menu", -1f, -1);
         }
     }
     else
     {
         this.ActivateObjectLabel(null, id, TutorialLabelType.PopupAttached, ControllerHand.None, "Open Menu", ControllerActionUI.UIMenu, string.Empty, ControllerActionUI.None, -1f, -1, AttachMode.PositionOnly, true);
     }
 }
Esempio n. 7
0
 // Token: 0x06005562 RID: 21858 RVA: 0x001D7520 File Offset: 0x001D5920
 private void ShowUnmuteButtonHighlight(string id)
 {
     if (QuickMenu.Instance != null && QuickMenu.Instance.IsActive)
     {
         Transform transform = QuickMenu.Instance.FindUnmuteButtonIfActive();
         if (transform != null)
         {
             this.ActivateObjectLabel(transform, id, TutorialLabelType.UI, ControllerHand.None, "Unmute", (!VRCInputManager.IsUsingHandController()) ? ControllerActionUI.UISelect : ControllerActionUI.None, string.Empty, ControllerActionUI.None, -1f, -1, AttachMode.PositionOnly, true);
         }
     }
 }
Esempio n. 8
0
 // Token: 0x060055CD RID: 21965 RVA: 0x001D8F61 File Offset: 0x001D7361
 public override bool ShouldDefaultToSeatedPlayMode()
 {
     return(!this._vrDetected || (VRDevice.model.Contains("Oculus Rift") && !VRCInputManager.IsUsingHandController()) || VRCTrackingManager.GetSeatedPlayMode());
 }
Esempio n. 9
0
 // Token: 0x060055B5 RID: 21941 RVA: 0x001D8A8C File Offset: 0x001D6E8C
 public override bool ShouldDefaultToSeatedPlayMode()
 {
     return(!this._vrDetected || !SteamVR.active || (SteamVR.instance == null && SteamVR.instance.hmd == null) || (SteamVR.instance.hmd_TrackingSystemName == "oculus" && !VRCInputManager.IsUsingHandController()) || VRCTrackingManager.GetSeatedPlayMode());
 }
Esempio n. 10
0
 // Token: 0x06005620 RID: 22048 RVA: 0x001DA974 File Offset: 0x001D8D74
 public static bool ShouldForceTalkToggle()
 {
     return(!VRCApplicationSetup.IsEditor() && VRCInputManager.IsUsingHandController());
 }