Screenclass

Access screen dimension etc.

object→Screen
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public static abstract sealed class Sandbox.Screen

Methods2

Showing 2 methods

Properties5

Showing 5 properties

public static float Sandbox.Screen.Aspect { get; set; }PUBLICSTATICGETSET

The aspect ratio of the screen. Equal to Width/Height, or 1 if the screen size is not yet known.

Returns:float—

public static float Sandbox.Screen.DesktopScale { get; set; }PUBLICSTATICGETSET

The desktop's dpi scale on the current monitor.

Returns:float—

public static float Sandbox.Screen.Height { get; set; }PUBLICSTATICGETSET

The height of the game screen. Equal to Screen.y

Returns:float—

public static Vector2 Sandbox.Screen.Size { get; set; }PUBLICSTATICGETSET

The last known pixel size of the game screen. Defaults to 1024x1024 before a game view is available.

Returns:Vector2—

public static float Sandbox.Screen.Width { get; set; }PUBLICSTATICGETSET

The width of the game screen. Equal to Screen.x

Returns:float—

On this page