Howdy, Stranger!

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

Sugarcane/Twine 1.4.2: Change Menu Texts (dumb beginners question)

How can I change the texts displayed in the sidebar, next to the button text esp. the "credits" text? I can't figure out

-- how and where to point to the elements
-- how to change them either with JS or CSS.

Simply changing the sugarcane html feels stupid, but the easiest way, I guess. I've tried CSS "content" statements or the JS stuff mentioned in changing the "restart" button, but nothing works and I'm getting frustrated and I can't find informaton on that anywhere.

Comments

  • warning: If you plan to have a downloadable version of your story that can be read offline , or are planning to locally test your story using a Chromium based web-browser like Chrome / Opera then I strongly suggest you change to using the SugarCube story format.
    The reason for this is that Chromium was recently changed to restrict access to the web-browser's History sub-system to locally opened HTML files, which will cause an error in Sugarcane.
    You can use Javascript like the following to change that text, the code should be placed within your story's script tagged passage. If you don't have one yet then use either the right mouse button context menu's New Script Here option or the Story > New > Script menu items to create one:
    var element = document.getElementById("snapback");
    if (element)
    	element.textContent = "Not Rewind";
    
    element = document.getElementById("restart");
    if (element)
    	element.textContent = "Not Restart";
    
    element = document.getElementById("bookmark");
    if (element)
    	element.textContent = "Not Bookmark";
    
    element = document.getElementById("credits");
    if (element)
    	element.textContent = "Not Credits";
    
    ... obviously change the actual text in the above example to whatever you want it to be.
  • Thx a lot man! Obviously my problem was also due to my lack of understanding of JS/sophisticated HTML coding.
Sign In or Register to comment.