Skip to main content

TouchScreen

A Screen, but can handle player mouse input. This is to be used with programming. It is a craftable and spawnable non-flammable solid.

Here is a list of possible sizes that reach the maximum malleability (400) that have integer components: 1x1x400, 1x2x200, 1x4x100, 1x5x80, 1x8x50, 1x10x40, 1x16x25, 1x20x20, 2x2x100, 2x4x50, 2x5x40, 2x8x25, 2x10x20, 4x4x25, 4x5x20, 4x10x10, 5x5x16, 5x8x10

At its default size (8x1x8) it has a durability of 1, at its maximum size it has a durability of 2.

By default, its colour is #111111.

It requires 4 Copper, 2 Iron, 1 Screen, 3 Silicon, and 1 TouchSensor to be crafted.

Methods


GetCursor(username) → cursor

Gets the specified player's cursor.

The username parameter is the username of the player's cursor you want to get. It is a string.

The cursor return is a Cursor.


GetCursors() → cursors

Gets a dictionary of player usernames to their cursors if their cursors are on the screen.

The cursors return is a dictionary of player usernames to their cursors. It is a dictionary with keys that are strings and values that are Cursors.

Events


Configured(configurerId)

Fires when the object is configured.

The configurerId parameter is the UserId of the player who configured the object. It is a number.


CursorMoved(Cursor)

Fires when a cursor is moved.

The Cursor parameter is a Cursor.


CursorPressed(Cursor)

Fires when a user presses their left mouse button.

The Cursor parameter is a Cursor.


CursorReleased(Cursor)

Fires when a user releases their left mouse button.

The Cursor parameter is a Cursor.