-
Notifications
You must be signed in to change notification settings - Fork 41
user formattedtext inline images
nhmkdev edited this page Mar 28, 2018
·
3 revisions
This guide covers the use of the img tag with FormattedText elements. This is a common use case for games that intend to use iconography within instructional text. You should have a functional knowledge of image pathing in relation to CardMaker projects before going through this tutorial.
- Create a new FormattedText element
- Create a graphic (for use as your inline icon). The size is not critical for this tutorial.
- Set the Definition value of the element to:
Causes 2 <img=attack.png> Damage
(your image name may vary of course)
The result may look something (ugly) like this:
The image may not even appear if the image is quite large. Newer versions of CardMaker will default the scale of the image to 100% (1.0) of the determined font height.
- You should probably adjust the size of the FormattedText element to better fit your text (depending on how you want it to look and/or line wrap)
- Set the Definition value of the element to:
Causes 2 <img=attack.png;0.9> Damage
The key part is the;0.9
. This sets up the scaling of the image in relation to the Font size (specifically the height).
The result should be something like this:
- See the manual for the other options in the image tag. You can specify the absolute width and height of the image if necessary.
- If the image refuses to show up for some reason, be sure to try the exact same path in a Graphic element to verify there are no other issues.