Mouseclass

Gives access to mouse position etc

objectMouse
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public static abstract sealed class Sandbox.Mouse

Properties7

Showing 7 properties

public static bool Sandbox.Mouse.Active { get; set; }PUBLICSTATICGETSET

Whether the local clients' cursor is active or not, meaning it can interact with UI elements, etc.

Returns:bool

public static string Sandbox.Mouse.CursorType { get; set; }PUBLICSTATICGETSET

Sets the cursor type used when the UI hasn't claimed the cursor (e.g. when the mouse falls through the UI onto the world). UI panel hover cursors take precedence over this.

Returns:string

public static Vector2 Sandbox.Mouse.Delta { get; set; }PUBLICSTATICGETSET

Change in local clients' cursor position since last frame.

Returns:Vector2

public static Vector2 Sandbox.Mouse.Position { get; set; }PUBLICSTATICGETSET

Access to local clients' cursor position, relative to game windows' top left corner.

Returns:Vector2

public static Sandbox.MouseVisibility Sandbox.Mouse.Visibility { get; set; }PUBLICSTATICGETSET

The visibility state of the mouse cursor. Auto will only show the mouse when clickable UI elements are visible.

Returns:MouseVisibility

public static bool Sandbox.Mouse.Visible { get; set; }PUBLICSTATICGETSETOBSOLETE

DEPRECATED. Use Mouse.Visibility instead.

Obsolete: This API member is obsolete.

Returns:bool

On this page