Hi everyone,
Another question I had regarding story format - I like how Jonah flows and if the player likes, they can scroll up and read the whole story. I figured out how to hide the titles of passages to make the text flow better, but I would also like to get ride of the links [[choices]] after the player has made a choice. This would help make the story read, well, more like a story with the options removed except for the current passage ones.
How can this be done?
Comments
Is there a way in Jonah to either remove the choices that weren't selected? I know I can achieve this by setting .disabled { display:none; } and having the .passage.title show, but as my choices tend to be quite long it would be helpful to not show the passage title and just show the choice (which would mean I could have shorter passage titles which is helpful for organisation purposes).
Failing that, I have used .disabled { display:none; } for the time being, but I'm getting a lot of white space where the choices used to be? I'm not sure that should be happening as from what I understood display:none should remove the text entirely, meaning no whitespace?
You can probably avoid this happening by using a <nobr> tag in you passage and manually adding your line returns using \ where needed.
eg.
Your code probably looks something like the following, with each choice on its own line based on your "I still want my choices to be on multiple lines rather than all bunched up on one line" comment.
(note: Im using TWEE notation) The above Start passage produces the following HTML, which you cans see yourself using the "Inspect Element" feature built into both of Firefox and Chrome's Debugger.
(note: The <br> tags are the line-feeds and the <a> tags are the choice links.) When you select one of the links the HTML changes to the following: As you can see the choice <a> tags have been replaced with <span> tags which are marked as disabled and the .disabled CSS rule in your stylesheet will make them disapear but the <br> tags between each of the disabled choices are unchanged and it is these <br> tags that you are seeing.
Adding the following CSS rule to your stylesheet passage will hide any <br> tags that appear directly after a disabled <span> tag. I hope that helps.