コード例 #1
0
        private void CheckForMouseEvents()
        {
            var mouseData = TCODMouse.getStatus();

            if (mouseData.CellVelocityX != 0 || mouseData.CellVelocityY != 0)
            {
                CurrentScene.MouseMoved(mouseData);
            }
            if (mouseData.WheelDown || mouseData.WheelUp)
            {
                CurrentScene.MouseWheel(mouseData);
            }
            if (mouseData.LeftButton != previousMouseData.LeftButton)
            {
                CurrentScene.MouseLeftButton(mouseData);
            }
            if (mouseData.MiddleButton != previousMouseData.MiddleButton)
            {
                CurrentScene.MouseMiddleButton(mouseData);
            }
            if (mouseData.RightButton != previousMouseData.RightButton)
            {
                CurrentScene.MouseRightButton(mouseData);
            }
            previousMouseData = mouseData;
        }