Table of Contents

Class Screen

Namespace
Cobilas.GodotEngine.Utility
Assembly
com.cobilas.godot.utility.dll

Gets or changes game screen information.

public static class Screen
Inheritance
Screen
Inherited Members

Properties

CurrentDisplay

The current screen.

public static DisplayInfo CurrentDisplay { get; }

Property Value

DisplayInfo

Returns a DisplayInfo with the information of the current screen.

CurrentResolution

The current resolution of the game screen.

public static Resolution CurrentResolution { get; }

Property Value

Resolution

Returns the current resolution of the game screen as Vector2D.

DisplayCount

Number of screens detected.

public static int DisplayCount { get; }

Property Value

int

Returns the number of screens detected when starting the application.

Displays

Gets all detected screens.

public static DisplayInfo[] Displays { get; }

Property Value

DisplayInfo[]

Returns all screens that were detected.

Remarks

This property will only return all screens that were detected from the start of the application, if another screen is connected during the execution of the application it will not be detected.

Mode

Represents current game screen mode.

public static ScreenMode Mode { get; set; }

Property Value

ScreenMode

The current game screen mode.

OrphanList

This property contains all custom resolution lists that are not tied to a DisplayInfo.

public static CustonResolutionList[] OrphanList { get; }

Property Value

CustonResolutionList[]

Returns lists of custom resolutions that are not tied to a DisplayInfo.

Resolutions

Represents the game screen resolutions.

public static Resolution[] Resolutions { get; }

Property Value

Resolution[]

Returns all stored resolutions.

ScreenRefreshRate

The current frequency of the game screen.

public static float ScreenRefreshRate { get; }

Property Value

float

Returns the current game screen frequency as a floating point.

Methods

AddResolution(in float, in float)

Add a custom resolution.

public static void AddResolution(in float width, in float height)

Parameters

width float

The width of the screen.

height float

The height of the screen.

AddResolution(in float, in float, in int)

Add a custom resolution.

public static void AddResolution(in float width, in float height, in int refreshRate)

Parameters

width float

The width of the screen.

height float

The height of the screen.

refreshRate int

The refresh rate of the monitor.

SetCurrentDisplay(in int)

Defines which screen will be used.

public static void SetCurrentDisplay(in int index)

Parameters

index int

The target index of the screen.

SetResolution(in Resolution)

sets the current screen resolution.

public static void SetResolution(in Resolution resolution)

Parameters

resolution Resolution

The new screen resolution.

SetResolution(in Resolution, in ScreenMode)

sets the current screen resolution.

public static void SetResolution(in Resolution resolution, in ScreenMode mode)

Parameters

resolution Resolution

The new screen resolution.

mode ScreenMode

Screen display mode.

SetResolution(in Vector2)

sets the current screen resolution.

public static void SetResolution(in Vector2 size)

Parameters

size Vector2

The size of the screen.

SetResolution(in Vector2, in ScreenMode)

sets the current screen resolution.

public static void SetResolution(in Vector2 size, in ScreenMode mode)

Parameters

size Vector2

The size of the screen.

mode ScreenMode

Screen display mode.

SetResolution(in Vector2, in int)

sets the current screen resolution.

public static void SetResolution(in Vector2 size, in int refreshRate)

Parameters

size Vector2

The size of the screen.

refreshRate int

The refresh rate of the monitor.

SetResolution(in Vector2, in int, in ScreenMode)

sets the current screen resolution.

public static void SetResolution(in Vector2 size, in int refreshRate, in ScreenMode mode)

Parameters

size Vector2

The size of the screen.

refreshRate int

The refresh rate of the monitor.

mode ScreenMode

Screen display mode.

Exceptions

ArgumentException

description

SetResolution(in float, in float)

sets the current screen resolution.

public static void SetResolution(in float width, in float height)

Parameters

width float

The width of the screen.

height float

The height of the screen.

SetResolution(in float, in float, in ScreenMode)

sets the current screen resolution.

public static void SetResolution(in float width, in float height, in ScreenMode mode)

Parameters

width float

The width of the screen.

height float

The height of the screen.

mode ScreenMode

Screen display mode.

SetResolution(in float, in float, in int)

sets the current screen resolution.

public static void SetResolution(in float width, in float height, in int refreshRate)

Parameters

width float

The width of the screen.

height float

The height of the screen.

refreshRate int

The refresh rate of the monitor.

SetResolution(in float, in float, in int, in ScreenMode)

sets the current screen resolution.

public static void SetResolution(in float width, in float height, in int refreshRate, in ScreenMode mode)

Parameters

width float

The width of the screen.

height float

The height of the screen.

refreshRate int

The refresh rate of the monitor.

mode ScreenMode

Screen display mode.