Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
borderColor#3D3D3D
bgColor#F4F4F4
titleColor#3D3D3D
borderWidth0
titleBGColor#3D3D3D
borderStylesolid

ON THIS PAGE

Table of Contents
indent20px

The pointer object provides information about screen-input devices connected to the player.

pointer IDL

Code Block
languagejs
titlepointer IDL
collapsetrue
[
	GarbageCollected
] interface Pointer {
	interface Pointer {
    Promise<bool> isMousePresent();
    	Promise<bool> isMultiTouchPresent();
    Promise<void> enableCursor(bool);
};

Object Creation

To create a point pointer object, first load the brightsign/pointer module using the Requirethe require() method. Then create an instance of the point pointer class.

Code Block
languagejs
var pointerClass = require("@brightsign/pointer");
var pointer = new pointerClass();

Pointer

Use this interface to determine whether a screen-input device is present.

isMousePresent()
Code Block
languagejs
Promise<bool> isMousePresent()

Returns true if a mouse is connected to the player.

isMultiTouchPresent()
Code Block
languagejs
Promise<bool> isMultiTouchPresent()

Returns true if a multitouch device is connected to the player.

enableCursor()
Code Block
languagejs
Promise<void> enableCursor(bool)

Display a cursor if the parameter passed is true.

Example

Code Block
languagejs
var PointerClass = require("@brightsign/pointer");
var pointer = new PointerClass();

pointer.isMousePresent().then(
        function(data) {
            console.log("***Mouse Present***");
            console.log(JSON.stringify(data));
        })
    .catch(
        function(data) {
            console.log(JSON.stringify(data));
        });

pointer.isMultiTouchPresent().then(
        function(data) {
            console.log("***MultiTouch Present***");
            console.log(JSON.stringify(data));
        })
    .catch(
        function(data) {
            console.log(JSON.stringify(data));
        });