setDrawingEraser: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page setDrawingEraser to SetDrawingEraser without leaving a redirect: Converting page title to first-letter uppercase) |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
Sets the eraser setting of the drawing that corresponds to the map and drawing id. If Set to {{code|false}}({{code|0}}) the drawing will be displayed normally, but if set to {{code|true}}({{code|1}}) the drawing will erase all below. | Sets the eraser setting of the drawing that corresponds to the map and drawing id. If Set to {{code|false}}({{code|0}}) the drawing will be displayed normally, but if set to {{code|true}}({{code|1}}) the drawing will erase all below. | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
setDrawingEraser( | setDrawingEraser(mapRef, drawingId, boolean) | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
{{param| | {{param|mapRef|The Name or ID of the map.}} | ||
{{param|drawingId|A string containing the id of the drawing. The easiest way to discover a drawing's Id is via the Draw Explorer interface.}} | {{param|drawingId|A string containing the id of the drawing. The easiest way to discover a drawing's Id is via the Draw Explorer interface.}} | ||
{{param|boolean|The value of the setting to set, {{code|true}}({{code|1}}) or {{code|false}}({{code|0}}).}} | {{param|boolean|The value of the setting to set, {{code|true}}({{code|1}}) or {{code|false}}({{code|0}}).}} | ||
|example= | |example= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h:setDrawingEraser("Grasslands", "0000000094218C675800000000000000",0)] | [h:setDrawingEraser("Grasslands", "0000000094218C675800000000000000",0)] | ||
[h:refreshDrawing("Grasslands", "0000000094218C675800000000000000")] | [h:refreshDrawing("Grasslands", "0000000094218C675800000000000000")] | ||
[h:setDrawingEraser("Grasslands", "00000000CCF6B567CC00000000000000",1)] | [h:setDrawingEraser("Grasslands", "00000000CCF6B567CC00000000000000",1)] | ||
[h:refreshDrawing("Grasslands", "00000000CCF6B567CC00000000000000")] | [h:refreshDrawing("Grasslands", "00000000CCF6B567CC00000000000000")] | ||
</ | </syntaxhighlight> | ||
|also= | |also= | ||
{{func|getDrawingEraser}} {{func|refreshDrawing}} | {{func|getDrawingEraser}} {{func|refreshDrawing}} | ||
}} | }} | ||
[[Category:Draw Function]] | [[Category:Draw Function]] |
Latest revision as of 23:59, 14 March 2023
setDrawingEraser() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.5.0
Sets the eraser setting of the drawing that corresponds to the map and drawing id. If Set to
false
(0
) the drawing will be displayed normally, but if set to true
(1
) the drawing will erase all below.Usage
setDrawingEraser(mapRef, drawingId, boolean)
Parameters
mapRef
- The Name or ID of the map.drawingId
- A string containing the id of the drawing. The easiest way to discover a drawing's Id is via the Draw Explorer interface.boolean
- The value of the setting to set,true
(1
) orfalse
(0
).
Example
[h:setDrawingEraser("Grasslands", "0000000094218C675800000000000000",0)]
[h:refreshDrawing("Grasslands", "0000000094218C675800000000000000")]
[h:setDrawingEraser("Grasslands", "00000000CCF6B567CC00000000000000",1)]
[h:refreshDrawing("Grasslands", "00000000CCF6B567CC00000000000000")]