bool WasRightMousePressed { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The WasRightMousePressed property is a static boolean property of the Gizmo class in the Sandbox namespace. It indicates whether the right mouse button was pressed during the last frame. This property is useful for detecting user interactions with the right mouse button in a frame-by-frame manner, allowing developers to implement custom logic based on right-click actions.

Usage

To use the WasRightMousePressed property, simply access it directly from the Gizmo class. It returns a boolean value that is true if the right mouse button was pressed in the last frame, and false otherwise.

Example

// Example usage of WasRightMousePressed
if (Gizmo.WasRightMousePressed)
{
    // Execute logic when the right mouse button is pressed
    // For example, open a context menu or select an object
}