Mouse Buttons

Implemented

This feature is fully implemented.

Left, right, and middle mouse button polling via GLFW, exposed to C# through NativeBridge.

API

if (NativeBridge.IsMouseButtonPressed(NativeBridge.GLFW_MOUSE_BUTTON_LEFT))
{
    // Left mouse button is held down
}

Button Constants

ConstantValueButton
GLFW_MOUSE_BUTTON_LEFT0Left click
GLFW_MOUSE_BUTTON_RIGHT1Right click
GLFW_MOUSE_BUTTON_MIDDLE2Middle click (scroll wheel press)

NativeBridge Methods

MethodDescription
bool IsMouseButtonPressed(int button)Returns true if the button is currently held down

Implementation Details

  • Polls GLFW mouse button state each frame via renderer_is_mouse_button_pressed()
  • Returns press state (held down), not click events
  • For other buttons, pass the GLFW mouse button code integer directly