Skip to content
Jigish Patel edited this page Jan 26, 2013 · 6 revisions

The Screen Object is returned by various Slate API functions. This page describes it in detail.

Description

The Screen Object represents a screen. It can be used to reference screens in operations.

Functions

id

Return the id of the Screen. This can be used to reference the screen in operations.

// assuming screen is the Screen Object
var screenId = screen.id();

rect

Return the rectangle that represents this Screen's location and size.

// assuming screen is the Screen Object
var rect = screen.rect();
var topLeftX = rect.x;
var topLeftY = rect.y;
var width = rect.width;
var height = rect.height;

isMain

Alias: main

Returns true if this screen is the main screen, false otherwise.

// assuming screen is the Screen Object
var isMain = screen.isMain();

Clone this wiki locally