コード例 #1
0
ファイル: GInput.cs プロジェクト: jayands/tAPI-SDK
        internal static void Update()
        {
            OldKeyboard = Keyboard;
            OldMouse = Mouse;

            Keyboard = KeyHandler.GetState();
            Mouse = MouseHandler.GetState();
        }
コード例 #2
0
ファイル: GInput.cs プロジェクト: jayands/tAPI-SDK
        internal static void Update()
        {
            OldKeyboard = Keyboard;
            OldMouse    = Mouse;

            Keyboard = KeyHandler.GetState();
            Mouse    = MouseHandler.GetState();
        }
コード例 #3
0
ファイル: MouseHandler.cs プロジェクト: jayands/tAPI-SDK
        /// <summary>
        /// Retrieves the current mouse state
        /// </summary>
        /// <returns>The current mouse state</returns>
        public static MouseHandler GetState()
        {
            XnaExtMouse xem = XnaExtMouse.GetState();

            MouseHandler ret = new MouseHandler()
            {
                l        = xem.Left,
                Right    = xem.Right,
                Middle   = xem.Middle,
                XButton1 = xem.XButton1,
                XButton2 = xem.XButton2
            };

            ret.Position    = xem.Position;
            ret.ScrollWheel = xem.ScrollWheel;

            return(ret);
        }
コード例 #4
0
ファイル: MouseHandler.cs プロジェクト: jayands/tAPI-SDK
        /// <summary>
        /// Retrieves the current mouse state
        /// </summary>
        /// <returns>The current mouse state</returns>
        public static MouseHandler GetState()
        {
            XnaExtMouse xem = XnaExtMouse.GetState();

            MouseHandler ret = new MouseHandler()
            {
                l = xem.Left,
                Right = xem.Right,
                Middle = xem.Middle,
                XButton1 = xem.XButton1,
                XButton2 = xem.XButton2
            };

            ret.Position = xem.Position;
            ret.ScrollWheel = xem.ScrollWheel;

            return ret;
        }