specifying link color in non-web interpreters

One of my projects would benefit from hyperlinks. I’ve added them using the “Simple Multimedia Effects for v10” extension, but this question is not about web games (released along with a Bisquixe interpreter). Instead, my question is about locally installed applications like Gargoyle and Lectrote.

So far as I can tell, there is no way to configure link color in the interpreters I’ve looked at (Gargoyle has an entry for it in its ini file, but I haven’t gotten it to work).

I’m worried that players using a custom color scheme might experience legibility problems with the default color. Is there a way to specify a link color in code, or something? Right now I’m thinking I’ll just let players turn the links off, but if there’s an alternative that would be great.

Any thoughts on this?

2 Likes

Unfortunately, Glk has no way of specifying the formatting of links. Glk libraries are free to format it however they like.

The library will attempt to display links in some distinctive way (and it will do this whether or not hyperlink input has actually been requested for the window). Naturally, blue underlined text is most likely. Link images may not be distinguished from non-link images, so it is best not to use a particular image both ways.

It would be reasonable for Glk to have a style class for hyperlinks that could be hinted in code, but I believe the current Glk style class hinting system is deprecated and will be replaced at some point, so I don’t know if it’s useful to suggest improvements to it. @Dannii might be persuaded to add it to his Glk extensions, though.

1 Like

Thanks, now that’s what I was afraid of! I think it’s really more of an interpreter thing, but I had hoped to fill in the gap. Customizing link color is something that ought to accompany a custom background color, though since hyperlinks don’t turn up often in Inform games, I guess it hasn’t come up much if at all

I can manage link color in a web game, but it would be nice to accommodate people who prefer local terps. I think the only option I can offer is the ability to turn them off, which I’ll do.

Thanks for giving it some thought!

In Parchment the links are outside the text spans, meaning the text’s colour stylehint (or per-character colour) will take precedence over the default link colour. You could suggest that other interpreters do likewise.

Gargoyle does let you distribute game specific config files. For example Kerkerkruip changed the link style: kerkerkruip/Kerkerkruip.materials/Kerkerkruip.ini at master · i7/kerkerkruip · GitHub

1 Like

Shouldn’t you be able to make a custom Inform phrase to change the text color, print the link, and change it back? Or, is the link-creation process so different that the default text color is ignored? I understand why it might be that way, but that sucks for game authors. But, if changing the text color is an option, you could use a variable for the link color and let people change it with actions, bypassing the lack of terp specific settings entirely.

1 Like

Sometimes you can! But sometimes you can’t. Unfortunately, it’s entirely up to the interpreter (and specifically the Glk library). Gargoyle overrides the text color of links, for example, in a way that the game itself can’t access.

1 Like

As a side comment, my color choices in garglk.ini aren’t taking, but I can change font size and type. Confusing. I wonder if I have a file taking precedence… I originally thought that Gargoyle wasn’t honoring my link colors specifically, but it’s any color setting at all. That changes things!

I can make a game-specific file, and that works. Weird. I don’t think I would, though, just to minimize the sorts of things that can go wrong.

In terms of natural language stuff, how can I specify a stylehint?

I think you would probably have to use inline I6 to do so. I don’t think anyone ever implemented the ability to create style hints in I7 itself, or if they did, there’s an extension that I don’t know about, but I don’t think that particular ability is in the standard rules. Of course, I haven’t used I7 since the 6G60 days, so things could definitely have changed and I’m just late to the party as always.

1 Like

Use the Glulx Text Effects extension.

OK, I’ll add something in. Thanks!