public void MouseMove(MouseMoveEventArgs mouseMoveEventArgs)
        {
            _resetTooltipTimer();
            // Update which control is considered hovered.
            var newHovered = MouseGetControl(mouseMoveEventArgs.Position);

            if (newHovered != CurrentlyHovered)
            {
                _clearTooltip();
                CurrentlyHovered?.MouseExited();
                CurrentlyHovered = newHovered;
                CurrentlyHovered?.MouseEntered();
            }

            var target = _controlFocused ?? newHovered;

            if (target != null)
            {
                var guiArgs = new GUIMouseMoveEventArgs(mouseMoveEventArgs.Relative / UIScale,
                                                        target,
                                                        mouseMoveEventArgs.Position / UIScale, mouseMoveEventArgs.Position,
                                                        mouseMoveEventArgs.Position / UIScale - target.GlobalPosition,
                                                        mouseMoveEventArgs.Position - target.GlobalPixelPosition);

                _doMouseGuiInput(target, guiArgs, (c, ev) => c.MouseMove(ev));
            }
        }
Esempio n. 2
0
 protected internal virtual void MouseMove(GUIMouseMoveEventArgs args)
 {
 }