Ejemplo n.º 1
0
        private void Scroll(State state)
        {
            var x = state.Gamepad.RightThumbX / 10_000;
            var y = state.Gamepad.RightThumbY / 10_000;

            mouseSimulator.HorizontalScroll(x);
            mouseSimulator.VerticalScroll(y);
        }
Ejemplo n.º 2
0
        private void Scroll(State state)
        {
            var x = state.Gamepad.RightThumbX / ScrollDivider;
            var y = state.Gamepad.RightThumbY / ScrollDivider;

            _mouseSimulator.HorizontalScroll(x);
            _mouseSimulator.VerticalScroll(y);
        }
Ejemplo n.º 3
0
        public void FireMouseEvent(IMouseSimulator a_ims, mousePacket a_mhs)
        {
            switch ((MouseEventFlag)a_mhs.flags)
            {
            case MouseEventFlag.MOUSEEVENTF_MOVE:
                a_ims.MoveMouseTo(a_mhs.x, a_mhs.y);
                break;

            case MouseEventFlag.MOUSEEVENTF_LEFTDOWN:
                a_ims.LeftButtonDown();
                break;

            case MouseEventFlag.MOUSEEVENTF_LEFTUP:
                a_ims.LeftButtonUp();
                break;

            case MouseEventFlag.MOUSEEVENTF_RIGHTDOWN:
                a_ims.RightButtonDown();
                break;

            case MouseEventFlag.MOUSEEVENTF_RIGHTUP:
                a_ims.RightButtonUp();
                break;

            case MouseEventFlag.MOUSEEVENTF_WHEEL:
                if (a_mhs.y > 0)
                {
                    a_ims.VerticalScroll(3);
                }
                else
                {
                    a_ims.VerticalScroll(-3);
                }
                break;
            }
        }