コード例 #1
0
        /// <summary>
        /// Initializes this instance and starts listening to mouse input events
        /// </summary>
        /// <exception cref="NotSupportedException">Is thrown if mouse manager is used on an usupported platform.</exception>
        public void Initialize()
        {
            // create platform-specific instance
            platform = MousePlatform.Create(game.Window.NativeWindow);

            // platform will report state changes trough these events:
            platform.MouseDown       += HandleMouseDown;
            platform.MouseUp         += HandleMouseUp;
            platform.MouseWheelDelta += HandleWheelDelta;
        }