Please forgive my obtuseness. I thought I'd have a go at adding just a tiny bit of HTML to a TADS 3.1 game, and I'm having no luck at all getting it to work.
Let's suppose I want to have a particular phrase display in an unusual color or font -- never mind why. So I go over to the webuires folder and edit main.htm, adding this to the head:
Code:
<style>
.zowie {
color: #c00000;
font-size: 3em;
}
</style>
Windows cleverly won't let me save main.htm back to the default TADS program directory, because it's inside of Program Files (x86), but never mind that -- I save my edited file to the desktop and then drag it by hand back into webuires.
I then edit the room description of the starter game as follows:
Code:
"This large, formal entryway is slightly intimidating:
the walls are lined with <span class=\"zowie\">somber portraits</span> of gray-haired
men from decades past; a medieval suit of armor<<describeAxe>>
towers over a single straight-backed wooden chair. The
front door leads back outside to the south. A hallway leads
north. "
This compiles, but the span tag does nothing. Now, quite possibly I'm making a dumb CSS error, but maybe not. The problem may be, instead, that I have to escape the quotation marks around the class= bit in order to get the game to compile, and that causes the web page not to recognize the class.
I'm pretty sure HTML tags can be used in game text, because if I substitute strong or em tags for the span tags, the result is displayed in the game. So the first question is, how do I get game text to recognize the class of a span tag?
The second question is, is there a way to create a stylesheet inside of the game code and post it to the main window (using Javascript, for instance), or do I have to edit the main.htm file directly?
Thanks for any tips!