overlay (roll option): Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Add Categories)
(Fill out with an example and categories.)
Line 1: Line 1:
{{stub}}[[Category:Roll Option]][[Category:Display Roll Option]]
{{stub}}[[Category:Roll Option]][[Category:Display Roll Option]][[Category:Overlay Function]]


[[Image:overlay_example.png|thumb|right|Note the selected units have dynamic health bars in the top left. Additionally, the onChangeSelection event is being used within the overlay to show health bars over only selected tokens.]]
[[Image:overlay_example.png|thumb|right|Selected units have health bars rendered in the top left in an overlay.]]
Overlays are a MapTool 1.7+ feature which 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.  
Overlays are a MapTool 1.7+ feature which 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.
Overlays can be called much like [[frame5 (roll option)|frames]] and [[dialog5 (roll option)|dialogs]]:
<pre>[overlay("MyOverlay"): { <h1 style='color:white;'>Hello, World!</h1> }]</pre>
Because overlays can't be closed like a frame or a dialog, users can instead toggle them off in the {{ui location|Window &gt; Overlays}} menu.


Between HTML5, CSS, and JavaScript, this allows for graphical user interfaces akin to Diablo and WoW.


== See Also ==
== See Also ==

Revision as of 22:27, 12 May 2020

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.

File:overlay example.png
Selected units have health bars rendered in the top left in an overlay.

Overlays are a MapTool 1.7+ feature which 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.

Overlays can be called much like frames and dialogs:

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

Because overlays can't be closed like a frame or a dialog, users can instead toggle them off in the Window > Overlays menu.


See Also