Skip to content

Screen

The Screen class provides access to display information. With this class, you can retrieve a list of supported screen resolutions, switch to a different resolution, and hide or show the system mouse cursor.

静态变量

Screen.DPI : number
(Read Only) The current DPI of the screen or device.
Screen.width : number
(Read Only) The current width of the screen window in pixels.
Screen.height : number
(Read Only) The current height of the screen window in pixels.
Screen.pixelScale : number
(Read-only) Drawing resolution scale factor
Screen.orientation : ScreenOrientation
屏幕的逻辑方向。