public override void MouseEvent(IntPtr winPtr, int button, int action, int modifier) { switch (button) { case Glfw3.GLFW_MOUSE_BUTTON_LEFT: _ui_button = UIMouseButtons.Left; break; case Glfw3.GLFW_MOUSE_BUTTON_RIGHT: _ui_button = UIMouseButtons.Right; break; case Glfw3.GLFW_MOUSE_BUTTON_MIDDLE: _ui_button = UIMouseButtons.Middle; break; } if (action == Glfw3.GLFW_PRESS) { _mouseArgs.SetMouseDownEventInfo(_mouseMoveX, _mouseMoveY, _ui_button, 1); _myTopWindowBridge.HandleMouseDown(_mouseArgs); } else { _mouseArgs.SetMouseUpEventInfo(_mouseMoveX, _mouseMoveY, _ui_button); _myTopWindowBridge.HandleMouseUp(_mouseArgs); _ui_button = UIMouseButtons.Left;//reset after mouseup } base.MouseEvent(winPtr, button, action, modifier); }
protected override void OnMouseDown(MouseButton btn, int x, int y) { _winBridge.HandleMouseDown(btn, x, y); base.OnMouseDown(btn, x, y); }