The styling of Glk hyperlinks is not ideal; in most (all?) interpreters you don’t have any control over the colour, and it might use an underline even in the status window. So while you could do a status window compass rose or Journey style interface with hyperlinks, it might be better to do them with mouse events instead, as then you’ll retain full styling control.
However mouse events are nowhere near as accessible as hyperlinks… so significant downsides for both options.
To be fair, isn’t the styling of anything in Glk not ideal at the moment? With style hints deprecated, you don’t necessarily have any control over the color anywhere.
Do note that all the specific code for these types of hyperlinks is in the story source file, it’s just a matter of calling the various phrases provided by the Glk foundations:
Hyperlink handling rule for a command replacement (this is the command replacement rule):
suspend text input in the main window, without input echoing;
set the current line input of the main window to text from address hyperlink value;
set the glk event type to line event;
Hyperlink handling rule for text appendment (this is the text appendment rule):
suspend text input in the main window, without input echoing;
set the current line input of the main window to "[current line input of the main window] [text from address hyperlink value]";
resume text input in the main window;
I think we probably will want to include one or both of these as built in tags, but I wanted to get more feedback first. (Also, the system only works with non-ephemeral texts, so I think it would be wise to add some debug code checking that the hyperlink text address is not on the stack.) But this framework also means that if people want to do command replacements a slightly different way from whatever we decide to include built-in, then it wouldn’t be hard for them to add their own. And for the discussions above about whether actions or verbs could be used directly instead of just stitching text together then giving it back to the parser, if there is a reliable way to do that we could consider including it as a built-in tag too.
Both would be great because that gives authors choice. My ideal would be a really simple one (no frills, just a cross with the cardinal points or an asterisk with all the points) that’s clickable and has the capacity to display only the directions available to the player, so the unused directions can either gray out or disappear.
How is a mouse event different from a hyperlink? They both say “click” to me.
The events are handled in very different ways. When a hyperlink is clicked you get the ID of that hyperlink. When a mouse event is received you get the X and Y coordinates and it’s then your responsibility to determine whether those coordinates were on anything you want to respond to.
having cited legend UI just after, seemed to me obvious that a graphical compass rose is my favorite, but I think that an hyperlink text compass rose, on the statusline or other window, can suffice (and perhaps easier to code…)
Sorry for the delay in answering your question, and