js:MapTool.clientInfo

From RPTools Wiki
Revision as of 05:37, 4 August 2021 by LPerkins (talk | contribs) (Created page with "Within the javascript environment used by {{code|js.eval}}, {{code|MapTool.clientInfo}} gives information about the client and user settings. {{MacroFunction |name=clientInfo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Within the javascript environment used by js.eval, MapTool.clientInfo gives information about the client and user settings.


clientInfo.faceEdge() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.9.4
Returns true if tokens face the edge.

Usage

MapTool.clientInfo.faceEdge();

Parameters

  • return true if tokens face the edge, false otherwise.


clientInfo.faceVertex() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.9.4
Opposite of faceEdge

Usage

MapTool.clientInfo.faceVertex();

Parameters

  • return true if tokens face the vertex, false otherwise.


clientInfo.portraitSize() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.9.4
Returns the number of pixels used to display portraits

Usage

MapTool.clientInfo.portraitSize();

Parameters

  • return Number of pixels high and wide a portrait is.


clientInfo.showStatSheet() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.9.4
Returns true if the player has show stat sheet selected in preferences.

Usage

MapTool.clientInfo.showStatSheet();

Parameters

  • return true if the stat sheet is show.



clientInfo.version() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.9.4
Version string of maptool.

Usage

MapTool.clientInfo.version();

Parameters

  • return The version information of MapTool, as a string.


clientInfo.fullScreen() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.9.4
Returns if the current frame is fullscreen.

Usage

MapTool.clientInfo.fullScreen();

Parameters

  • return true if the current frame is fullscreen.


clientInfo.timeInMs() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.9.4
Returns the current time with ms precision.

Usage

MapTool.clientInfo.timeInMs();

Parameters

  • return System time in miliseconds as an integer.


clientInfo.timeDate() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.9.4
Returns the current time and date as an opaque object. Just use new Date() instead.

Usage

MapTool.clientInfo.timeDate();

Parameters

  • return System time as a java Date object. It can be converted to an integer or a string, but is otherwise opaque.


clientInfo.libraryTokens() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.9.4
Returns a map of all library tokens.

Usage

MapTool.clientInfo.libraryTokens();

Parameters

  • return Javascript object mapping library token names to library versions.


clientInfo.userDefinedFunctions() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.9.4
Returns a list of user defined function aliases.

Usage

MapTool.clientInfo.userDefinedFunctions();

Parameters

  • return A list of user defined function aliases.


clientInfo.getClientId() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.9.4
Returns the unique ID of the current client as a string.

Usage

MapTool.clientInfo.getClientId();

Parameters

  • return Current client ID.


See Also

JS: MapTool