/** Main
         */
        public static bool Main()
        {
            UnityEngine.InputSystem.Pointer t_device = UnityEngine.InputSystem.Pointer.current;
            if (t_device != null)
            {
                //デバイス。
                int t_x;
                int t_y;
                {
                    int t_pos_x = (int)t_device.position.x.ReadValue();
                    int t_pos_y = (int)(UnityEngine.Screen.height - t_device.position.y.ReadValue());

                    //(GUIスクリーン座標)=>(仮想スクリーン座標)。
                    Fee.Render2D.Render2D.GetInstance().GuiScreenToVirtualScreen(t_pos_x, t_pos_y, out t_x, out t_y);
                }

                //設定。
                Fee.Input.Input.GetInstance().mouse.cursor.Set(t_x, t_y);

                //debugview
                                #if (UNITY_EDITOR) || (DEVELOPMENT_BUILD) || (USE_DEF_FEE_DEBUGTOOL)
                {
                    Fee.Input.Input.GetInstance().debugview.mouse_position = "Mouse_Position_InputSystem_Pointer";
                }
                                #endif

                return(true);
            }
            return(false);
        }
示例#2
0
        /** Main
         */
        public static bool Main()
        {
            UnityEngine.InputSystem.Pointer t_device = UnityEngine.InputSystem.Pointer.current;
            if (t_device != null)
            {
                //is_focus
                bool t_is_focus = Fee.Input.Input.GetInstance().is_focus;

                //デバイス。
                bool t_l_on = t_device.press.isPressed;

                //設定。
                Fee.Input.Input.GetInstance().mouse.left.Set(t_l_on & t_is_focus);
                Fee.Input.Input.GetInstance().mouse.right.Set(false & t_is_focus);
                Fee.Input.Input.GetInstance().mouse.middle.Set(false & t_is_focus);

                //debugview
                                #if (UNITY_EDITOR) || (DEVELOPMENT_BUILD) || (USE_DEF_FEE_DEBUGTOOL)
                {
                    Fee.Input.Input.GetInstance().debugview.mouse_button = "Mouse_MouseButton_InputSystem_Pointer";
                }
                                #endif

                return(true);
            }
            return(false);
        }