Mouseclass
Access to mouse position, movement, input mode and cursor appearance.
Properties7
Showing 7 properties
public static bool Sandbox.Mouse.Active { get; set; }
Whether the cursor can interact with UI. Can be true even when `Sandbox.Mouse.CursorType` is `"none"`.
bool—public static string Sandbox.Mouse.CursorType { get; set; }
Sets the cursor image. UI hover cursors can overwrite or reset this value. Use `"none"` to hide the image without changing input mode or pointer speed.
string—public static Vector2 Sandbox.Mouse.Delta { get; set; }
Mouse movement since the last frame. Captured input normally bypasses OS pointer speed and acceleration. Unaffected by `Sandbox.Preferences.Sensitivity`, which scales `Sandbox.Input.AnalogLook`.
public static Vector2 Sandbox.Mouse.Position { get; set; }
The local client's cursor position, in pixels relative to the game window's top-left corner. In captured mode, accumulates relative movement instead of tracking the OS cursor.
public static Sandbox.MouseVisibility Sandbox.Mouse.Visibility { get; set; }
Controls cursor interaction and capture. `Sandbox.MouseVisibility.Hidden` uses relative input, which normally bypasses OS pointer speed and acceleration. For a game-drawn cursor with OS pointer speed, use `Sandbox.MouseVisibility.Visible` with `Mouse.CursorType = "none"` and draw at `Sandbox.Mouse.Position`.
public static bool Sandbox.Mouse.Visible { get; set; }
DEPRECATED. Use Mouse.Visibility instead.
Obsolete: This API member is obsolete.
bool—No results match this filter.