VTML: Difference between revisions

From Vintage Story Wiki
481 bytes added ,  2 months ago
Describe external icons
(Add missing internal icons)
(Describe external icons)
Line 21: Line 21:


<!--T:5-->
<!--T:5-->
'''<nowiki><icon name="[icon name]"></icon></nowiki>'''<br>Draws a symbol, selected from a list of predefined, hardcoded symbols, which can be used when modifying the Handbook or any other rich text in the game. These icons can be scaled and coloured by adding the appropriate commands.
'''<nowiki><icon name="[icon name]"></icon></nowiki>'''<br>Draws an internal icon. See the list below. Note that the waypoint svg icon files are also registered as internal icons.
 
'''<nowiki><icon path="[icon svg path]"></icon></nowiki>'''<br>Draws an icon from an svg file. The path is relative to the texture folder, and should include the svg extension. By default the icons are loaded from the base game, but icons can be loaded from mods by prefixing the path with the mod domain (followed by a colon).
 
Both kinds of mods can be scaled and colored by the font tag. This is almost necessary for the svg icons, as they are otherwise rendered very small. For example, '''<nowiki><font size="30"><icon path="icons/checkmark.svg"></icon></font></nowiki>'''


<!--T:9-->
<!--T:9-->
Line 71: Line 75:
*'''<nowiki><icon name=plusicon></nowiki>'''<br>Plus icon
*'''<nowiki><icon name=plusicon></nowiki>'''<br>Plus icon


====Waypoint Icons==== <!--T:7-->
====Internal Waypoint Icons==== <!--T:7-->


<!--T:11-->
<!--T:11-->
Confirmedusers
261

edits