bool HasPressed { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The HasPressed property is a static boolean property of the Gizmo class in the Sandbox namespace. It indicates whether any gizmo has been pressed. However, this property is marked as obsolete and should not be used in new code. Instead, use Gizmo.Pressed.Any to check if any gizmo is pressed.

Usage

To check if any gizmo is pressed, use the recommended Gizmo.Pressed.Any property instead of HasPressed as the latter is obsolete.

Example

// Obsolete usage
bool isPressed = Gizmo.HasPressed;

// Recommended usage
bool isPressed = Gizmo.Pressed.Any;