js:MapTool.clientInfo: Difference between revisions
mNo edit summary |
No edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="javascript" line> | ||
MapTool.clientInfo.faceEdge(); | MapTool.clientInfo.faceEdge(); | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
Line 27: | Line 27: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="javascript" line> | ||
MapTool.clientInfo.faceVertex(); | MapTool.clientInfo.faceVertex(); | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
Line 43: | Line 43: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="javascript" line> | ||
MapTool.clientInfo.portraitSize(); | MapTool.clientInfo.portraitSize(); | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
Line 60: | Line 60: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="javascript" line> | ||
MapTool.clientInfo.showStatSheet(); | MapTool.clientInfo.showStatSheet(); | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
Line 78: | Line 78: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="javascript" line> | ||
MapTool.clientInfo.version(); | MapTool.clientInfo.version(); | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
Line 94: | Line 94: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="javascript" line> | ||
MapTool.clientInfo.fullScreen(); | MapTool.clientInfo.fullScreen(); | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
Line 111: | Line 111: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="javascript" line> | ||
MapTool.clientInfo.timeInMs(); | MapTool.clientInfo.timeInMs(); | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
Line 129: | Line 129: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="javascript" line> | ||
MapTool.clientInfo.timeDate(); | MapTool.clientInfo.timeDate(); | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
Line 146: | Line 146: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="javascript" line> | ||
MapTool.clientInfo.libraryTokens(); | MapTool.clientInfo.libraryTokens(); | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
Line 163: | Line 163: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="javascript" line> | ||
MapTool.clientInfo.userDefinedFunctions(); | MapTool.clientInfo.userDefinedFunctions(); | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
Line 180: | Line 180: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="javascript" line> | ||
MapTool.clientInfo.clientId(); | MapTool.clientInfo.clientId(); | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' |
Latest revision as of 23:59, 15 March 2023
This article describes a feature or macro function that is experimental and may be subject to change.
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
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
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
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
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
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
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
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
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
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
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
Usage
MapTool.clientInfo.clientId();
Parameters
return
Current client ID.