20,741
edits
(→tag) |
m (→tag) |
||
Line 132: | Line 132: | ||
pushElement('text', id); | pushElement('text', id); | ||
stack[-1].set("text", tspan.text); | stack[-1].set("text", tspan.text); | ||
So, now we need to look up the corresponding property that sets the filename, we can do that by opening api.nas and looking up the setFile() method in Canvas.Image: | |||
<syntaxhighlight lang="nasal"> | |||
# Set image file to be used | |||
# | |||
# @param file Path to file or canvas (Use canvas://... for canvas, eg. | |||
# canvas://by-index/texture[0]) | |||
setFile: func(file) | |||
{ | |||
me.set("src", file); | |||
}, | |||
</syntaxhighlight> |