Hello All,
In the game I'm working on, I'm having the player write their team name and choose an icon to represent that team.
So far, I've got:
What is your team name?
<<textbox "$team.name" "">>
Choose a symbol to represent your team:
<<click [img[images/01.png]]>><<set $team.icon to '<img src="01.png" />'>>
<</click>><<click [img[images/02.png]]>><<set $team.icon to '<img src="02.png" />'>>
<</click>>
I'm setting up the widget macro so that it displays the team name and icon along the top of the story throughout the duration, like this:
@
...
The image displays just fine, and when I clicked on the image and set the $team.icon to text, it displayed no problem. Is it possible to have an image stored as a variable? Or is my syntax just off? Thank you!
Comments
Follow-up question: would you be able to point me in the right direction to get the image and the $team.name to appear next to each other instead of on top of one another? I tried:
...to no avail. Image appears on one line, and text appears below it. Both are aligned left.
By default all heading elements are displayed as a block, which is causing your image to appear on a difference line. If you remove the h2 tag then the image and text will appear on the same line.
note: The h2 element's default font-size is 1.5em.