コード例 #1
0
ファイル: LocomotionTool.cs プロジェクト: chunlei/EditorVR
        void ShowFeedback(List <ProxyFeedbackRequest> requests, string controlName, string tooltipText = null)
        {
            if (tooltipText == null)
            {
                tooltipText = controlName;
            }

            List <VRInputDevice.VRControl> ids;

            if (m_Controls.TryGetValue(controlName, out ids))
            {
                foreach (var id in ids)
                {
                    var request = new ProxyFeedbackRequest
                    {
                        node        = node,
                        control     = id,
                        tooltipText = tooltipText
                    };

                    this.AddFeedbackRequest(request);
                    requests.Add(request);
                }
            }
        }
コード例 #2
0
ファイル: InputUtils.cs プロジェクト: LeksayProjects/VRAR
        public static void GetBindingDictionaryFromActionMap(ActionMap actionMap, BindingDictionary bindingDictionary)
        {
            var actions = actionMap.actions;

            foreach (var scheme in actionMap.controlSchemes)
            {
                var bindings = scheme.bindings;
                for (var i = 0; i < bindings.Count; i++)
                {
                    var binding = bindings[i];
                    var action  = actions[i].name;
                    List <VRInputDevice.VRControl> controls;
                    if (!bindingDictionary.TryGetValue(action, out controls))
                    {
                        controls = new List <VRInputDevice.VRControl>();
                        bindingDictionary[action] = controls;
                    }

                    foreach (var source in binding.sources)
                    {
                        bindingDictionary[action].Add((VRInputDevice.VRControl)source.controlIndex);
                    }
                }
            }
        }
コード例 #3
0
ファイル: UndoMenu.cs プロジェクト: PushyPixels/EditorXR
        void ShowFeedback()
        {
            List <VRInputDevice.VRControl> controls;

            if (m_Controls.TryGetValue(k_EngageControlName, out controls))
            {
                foreach (var id in controls)
                {
                    var request = this.GetFeedbackRequestObject <ProxyFeedbackRequest>(this);
                    request.control     = id;
                    request.node        = node;
                    request.tooltipText = m_FeedbackHintForCurrentController;
                    this.AddFeedbackRequest(request);
                }
            }
        }
コード例 #4
0
ファイル: UndoMenu.cs プロジェクト: nestle1998/EditorXR
        void ShowFeedback()
        {
            List <VRInputDevice.VRControl> controls;

            if (m_Controls.TryGetValue(k_EngageControlName, out controls))
            {
                foreach (var id in controls)
                {
                    this.AddFeedbackRequest(new ProxyFeedbackRequest
                    {
                        control     = id,
                        node        = node,
                        tooltipText = m_FeedbackHintForCurrentController
                    });
                }
            }
        }
コード例 #5
0
        void ShowFeedback(List<ProxyFeedbackRequest> requests, string controlName, string tooltipText = null)
        {
            if (tooltipText == null)
                tooltipText = controlName;

            List<VRInputDevice.VRControl> ids;
            if (m_Controls.TryGetValue(controlName, out ids))
            {
                foreach (var id in ids)
                {
                    var request = (ProxyFeedbackRequest)this.GetFeedbackRequestObject(typeof(ProxyFeedbackRequest));
                    request.node = node;
                    request.control = id;
                    request.tooltipText = tooltipText;
                    requests.Add(request);
                    this.AddFeedbackRequest(request);
                }
            }
        }
コード例 #6
0
ファイル: RadialMenu.cs プロジェクト: xxpniu/EditorXR
        void ShowFeedback()
        {
            List <VRInputDevice.VRControl> controls;

            if (m_Controls.TryGetValue("SelectItem", out controls))
            {
                foreach (var id in controls)
                {
                    var request = (ProxyFeedbackRequest)this.GetFeedbackRequestObject(typeof(ProxyFeedbackRequest));
                    request.control     = id;
                    request.node        = node;
                    request.tooltipText = "Select Action (Press to Execute)";
                    this.AddFeedbackRequest(request);
                }
            }
        }
コード例 #7
0
ファイル: MainMenu.cs プロジェクト: momansouri/EditorXR
        void ShowFeedback()
        {
            var tooltipText = this.GetDeviceType() == DeviceType.Vive ? "Swipe to Rotate Menu" : "Rotate Menu";
            List <VRInputDevice.VRControl> controls;

            if (m_Controls.TryGetValue("FlickFace", out controls))
            {
                foreach (var id in controls)
                {
                    var request = (ProxyFeedbackRequest)this.GetFeedbackRequestObject(typeof(ProxyFeedbackRequest));
                    request.control     = id;
                    request.node        = node;
                    request.tooltipText = tooltipText;
                    this.AddFeedbackRequest(request);
                }
            }
        }
コード例 #8
0
ファイル: RadialMenu.cs プロジェクト: chunlei/EditorVR
        void ShowFeedback()
        {
            List <VRInputDevice.VRControl> controls;

            if (m_Controls.TryGetValue("SelectItem", out controls))
            {
                foreach (var id in controls)
                {
                    this.AddFeedbackRequest(new ProxyFeedbackRequest
                    {
                        control     = id,
                        node        = node,
                        tooltipText = "Select Action (Press to Execute)"
                    });
                }
            }
        }
コード例 #9
0
        void ShowFeedback()
        {
            var tooltipText = this.GetDeviceType() == DeviceType.Vive ? "Press to Rotate Menu" : "Rotate Menu";
            List <VRInputDevice.VRControl> controls;

            if (m_Controls.TryGetValue("FlickFace", out controls))
            {
                foreach (var id in controls)
                {
                    this.AddFeedbackRequest(new ProxyFeedbackRequest
                    {
                        control     = id,
                        node        = node,
                        tooltipText = tooltipText
                    });
                }
            }
        }
コード例 #10
0
        void ShowFeedback(List <ProxyFeedbackRequest> requests, Node node, string controlName, string tooltipText, bool suppressExisting = false)
        {
            List <VRInputDevice.VRControl> ids;

            if (m_Controls.TryGetValue(controlName, out ids))
            {
                foreach (var id in ids)
                {
                    var request = (ProxyFeedbackRequest)this.GetFeedbackRequestObject(typeof(ProxyFeedbackRequest));
                    request.node             = node;
                    request.control          = id;
                    request.priority         = 1;
                    request.tooltipText      = tooltipText;
                    request.suppressExisting = suppressExisting;
                    requests.Add(request);
                    this.AddFeedbackRequest(request);
                }
            }
        }
コード例 #11
0
        void ShowFeedback(List <ProxyFeedbackRequest> requests, Node node, string controlName, string tooltipText, bool suppressExisting = false)
        {
            List <VRInputDevice.VRControl> ids;

            if (m_Controls.TryGetValue(controlName, out ids))
            {
                foreach (var id in ids)
                {
                    var request = new ProxyFeedbackRequest
                    {
                        node             = node,
                        control          = id,
                        priority         = 1,
                        tooltipText      = tooltipText,
                        suppressExisting = suppressExisting
                    };

                    this.AddFeedbackRequest(request);
                    requests.Add(request);
                }
            }
        }
コード例 #12
0
ファイル: WorkspaceUI.cs プロジェクト: PushyPixels/EditorXR
        void ShowFeedback(List <ProxyFeedbackRequest> requests, Node node, string controlName, string tooltipText, int priority = 1)
        {
            if (tooltipText == null)
            {
                tooltipText = controlName;
            }

            List <VRInputDevice.VRControl> ids;

            if (m_Controls.TryGetValue(controlName, out ids))
            {
                foreach (var id in ids)
                {
                    var request = this.GetFeedbackRequestObject <ProxyFeedbackRequest>(this);
                    request.node        = node;
                    request.control     = id;
                    request.priority    = priority;
                    request.tooltipText = tooltipText;
                    requests.Add(request);
                    this.AddFeedbackRequest(request);
                }
            }
        }