overlay (roll option)

From RPTools Wiki
Revision as of 19:13, 19 May 2020 by Phergus (talk | contribs)
Jump to navigation Jump to search

[overlay():] Roll Option

* Introduced in version 1.7.0

Places a transparent HTML5 overlay over the map view. Players can click through the overlay to affect the map as normal, but clickable effects on the overlay will work as intended. Using HTML5, CSS, and JavaScript, overlays enable graphical user interfaces akin to Diablo and WoW right in MapTool.

Because overlays don't have a close gadget like a frame or a dialog, you can use closeOverlay() to close the overlay or you can toggle them on or off in the Window > Overlays menu.

An overlay showing selected units' health bars in the top left.

Usage

[overlay(overlayName): { ... }]

The title parameter overlayName, should be a string that specifies the internal name of the overlay. It is also the name of the overlay as it will appear in Window > Overlays menu.

Examples

The following code simply prints 'Hello World' in large white letters at the top left of the map view:

[overlay("MyOverlay"): { <h1 style='color:white;'>Hello, World!</h1> }]

See Also

[frame():]
[frame5():]
[dialog():]
[dialog5():]
Whitelisted CDNs

Version Changes

  • 1.7.0 - Introduced.