Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Adding unicode symbols to StoryMenu links in sugarcube 2

Version 2.14 of sugarcube and 1.4.2 of twine.

So I want to add symbols to my StoryMenu items (similar to the #menu-core items, really), however, most of the ways I tried didn't work out, largely because the StoryMenu passage doesn't render anything that's not a link. I was planning to do it in the CSS by giving each menu item a ::before, the same way the menu-core items work.

I tried just using html character codes, but that didn't do much. Maybe it'll work if I use anchors instead and just write the passage in html? That's the next thing I'll try. Anyway, I'm certain there's some simple solution I'm overlooking, and some guidance would be appreciated.

Comments

  • Nevermind, just needed to use JavaScript escapes.
  • I don't know what you eventually did, however, to apply them via CSS, as SugarCube does, you would use CSS Unicode escapes, not the JavaScript escapes—the format is slightly different between the two. For example, a Unicode escape for the no-break space would be \00a0 in CSS and \u00a0 in JavaScript.
Sign In or Register to comment.