/// <summary> /// Registers mouse input events from an existing Control. /// NOTE: Does not allow registering mouse inputs from more than 2 sources /// </summary> internal virtual void RegisterMouseInput() { if (mouseInputRegistered) { return; } mousePress = new HandleMousePress(HandleMousePress); mouseRelease = new HandleMouseRelease(HandleMouseRelease); mouseMove = new HandleMouseMove(HandleMouseMove); mouseDrag = new HandleMouseDrag(HandleMouseDrag); mouseWheelMove = new HandleMouseWheelMove(HandleMouseWheel); // We handle mouse click internally instead of relying on MouseInput class. //MouseInput.Instance.MouseClickEvent += mouseClick; MouseInput.Instance.MousePressEvent += mousePress; MouseInput.Instance.MouseReleaseEvent += mouseRelease; MouseInput.Instance.MouseMoveEvent += mouseMove; MouseInput.Instance.MouseDragEvent += mouseDrag; MouseInput.Instance.MouseWheelMoveEvent += mouseWheelMove; mouseInputRegistered = true; }
/// <summary> /// Registers mouse input events from an existing Control. /// NOTE: Does not allow registering mouse inputs from more than 2 sources /// </summary> internal virtual void RegisterMouseInput() { if (mouseInputRegistered) return; mousePress = new HandleMousePress(HandleMousePress); mouseRelease = new HandleMouseRelease(HandleMouseRelease); mouseMove = new HandleMouseMove(HandleMouseMove); mouseDrag = new HandleMouseDrag(HandleMouseDrag); mouseWheelMove = new HandleMouseWheelMove(HandleMouseWheel); // We handle mouse click internally instead of relying on MouseInput class. //MouseInput.Instance.MouseClickEvent += mouseClick; MouseInput.Instance.MousePressEvent += mousePress; MouseInput.Instance.MouseReleaseEvent += mouseRelease; MouseInput.Instance.MouseMoveEvent += mouseMove; MouseInput.Instance.MouseDragEvent += mouseDrag; MouseInput.Instance.MouseWheelMoveEvent += mouseWheelMove; mouseInputRegistered = true; }