...
Code Block |
---|
language | js |
---|
title | pointer IDL |
---|
collapse | true |
---|
|
[
GarbageCollected
] interface Pointer {
interface Pointer {
Promise<bool> isMousePresent();
Promise<bool> isMultiTouchPresent();
Promise<void> enableCursor(bool);
}; |
Object Creation
To create a pointer object, first load the brightsign/pointer
module using the require()
method. Then create an instance of the pointer class.
...
Returns true
if a multitouch device is connected to the player.
enableCursor()
Code Block |
---|
|
Promise<void> enableCursor(bool) |
Display a cursor if the parameter passed is true
.
Example
Code Block |
---|
|
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));
}); |