Mouse
Introduction
Detecting Mouse Activity
if (InputManager.Mouse.ButtonPushed(Mouse.MouseButtons.LeftButton))
{
// Left mouse button pushed - down this frame, not down last frame.
}
if (InputManager.Mouse.ButtonReleased(Mouse.MouseButtons.MiddleButton))
{
// Middle mouse button released - not down this frame, down last frame.
// This is the same as a click.
}
if (InputManager.Mouse.ButtonDown(Mouse.MouseButtons.RightButton))
{
// Right mouse button down this frame;
}
if (InputManager.Mouse.ButtonDoubleClicked(Mouse.MouseButtons.LeftButton))
{
// Left button double-clicked.
}Mouse Scroll Wheel
Mouse Pixel Coordinates
Mouse World Coordinates
Detecting Mouse in Window
Last updated
Was this helpful?