Add icon text tag

This commit is contained in:
LoafyLemon 2024-06-17 19:24:31 +01:00
parent 2e240545a5
commit af76d839a1

View File

@ -28,6 +28,11 @@ init python:
return kwargs
@renpy.pure
def text_tag_icon(tag, argument):
"""Insert a unicode heart symbol. Usage {heart}"""
return [(renpy.TEXT_DISPLAYABLE, Transform(argument, xysize=(32, 32)))]
@renpy.pure
def text_tag_unicode(tag, argument, contents):
"""Render contents using a font that supports all/most Unicode characters. Usage {unicode}☺{/unicode}"""
@ -273,6 +278,7 @@ define config.custom_text_tags = {
}
define config.self_closing_custom_text_tags = {
"icon": text_tag_icon,
"heart": text_tag_heart,
"hearts": text_tag_hearts,
"number": text_tag_number,