TADS 3 Options Menu

I want to include an options menu in my game where they player can modify various settings controling how the world works. The game includes an economic management element, and this menu should have various options on how the economy operates. Ideally, there would be a list of parameters with clickable buttons incrementing and decrementing those parameters, all on a single page.

However, I have the impression the built-in menu system isn’t really intended for that, but rather to construct a sort of reference. Maybe it’s possible with the hyperlink system, but I’ve only ever used it to pass commands to the parser. Is there a way to make these links simply execute a function or method?

Yes. You can use roll-over images for buttons. See:

tads.org/t3doc/doc/htmltads/ … sAdditions

Thanks! That’s excellent to know, but the part where I’m stuck is maybe a little more basic, namely how to affect the program state by clicking on something directly, without going through the command parser.

I mean, of course it would be possible to use unique commands that send the player back to the menu where they were, but I had hoped to find a more direct route.

Can’t you just hide the command prompt by maximizing the options window?

The normal menu functions take care of that :slight_smile:. It’s not that I want to stop the player from typing in the command prompt, I want to have multiple buttons available simultaneously that can be pressed, changing some value but leaving the user on the same menu item. I think I’m wording what I want the wrong way, though…

Well, using the workaround I mentioned is of course perfectly fine :slight_smile:.

The menu system is not suitable for that. You should really implement your own window.

Edit:

Take a look at this. The source is included so maybe you can get some ideas:

ifdb.tads.org/viewgame?id=e2qi61r56mtufr6m

Make sure you create a new “extensions” directory before you try to compile it. Compile in debug mode and then move “customBanner.t3” into the main directory before you run it.

(This demo hasn’t aged well. It’s ancient and doesn’t work out-of-the-box anymore without the above workarounds.)