Howdy, Stranger!

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

Remove back option in 2.0?

I've looked for the answer for this, but it all seems to be relevant to earlier versions and doesn't help me at all.

I want to create a story where if you reach a dead end, you have to start over again. (or go back to a checkpoint, which I can do just by making a link in the dead end parts back to the checkpoint)

I don't want readers to be able to just go back and fix their mistake that easily.

However, I cannot for the life of me figure out how to disable that annoying little back button.

Comments

  • Please, always state which story format you're using. Halowe is the default for Twine 2. Assuming it's Harlowe:

    Click on the story menu in the lower left corner, then "Edit Story Stylesheet."

    Paste the following code into the window's field:

    tw-sidebar
    {
    display: none;
    }

    That should do it!

    You might also find my beginner's guide handy, though it's written for Twine 1: CSS is Your Friend: The Basics of Changing Twine's Default Appearance For Newbs

    I need to get it updated.

    For those who find this via search in the far-flung future and are having trouble with the basics in Harlowe, there are also tw-story and tw-passage selectors. Try turning the colors of those and see what happens.
  • Is it possible to display the sidebar in certain passages only? Or perhaps only at the beginning? And then from then on the back button is gone?
  • Is it possible to display the sidebar in certain passages only? Or perhaps only at the beginning? And then from then on the back button is gone?
    You need to state which story format you are using, as answers can be different for each one.

  • Is it possible to display the sidebar in certain passages only? Or perhaps only at the beginning? And then from then on the back button is gone?

    Yes, in sugarcube this is how you do it-
    /* disables the sidebar on the menu screen */ 
    body.menu #ui-bar {
    	display: none;
    }
    

    So if you put that in your stylesheet it will disable the sidebar (in sugarcube) on passages tagged with 'menu' You can set it to any tag you want. If you're using another format you might want to change #ui-bar to #sidebar but I'm not sure about how those ones work. No clue how to turn off the back button.
  • edited August 2015
    Doing via tags will only be temporary.

    In SugarCube you can use the <<addclass>> macro for a more permanent solution as follows:
     #ui-bar.remove {
    	display: none;
    }
    

    Then when you want to remove it, type in a passage <<addclass "#ui-bar" "remove">>.

    If you want to get it back just type <<removeclass "#ui-bar" "remove">> in a later passage.

    Yiou can also do stuff like a fade by going:
     #ui-bar.remove {
    	animation: fadeOut 1s 1 forwards;
    }
    

    And then in animation rules (you'll need to google css animations) define the fadeOut animation to go from 100% opacity to 0%, and also set visibility: hidden at the end of the animation.


    The same thing can be done in Harlowe but you have to use some Javascript to do so.
  • When you say it's only temporary, what do you mean?
  • edited August 2015
    k3lit0 wrote: »
    So if you put that in your stylesheet it will disable the sidebar (in sugarcube) on passages tagged with 'menu'

    So you'd be tagging every single passage with menu if you wanted it permanently gone for a range of passages wouldn't you?

    <<addclass>> is independent of the passage, basically is just a shorthand macro for a javascript add class function. So it adds it until you remove the class.
  • Claretta wrote: »

    So you'd be tagging every single passage with menu if you wanted it permanently gone for a range of passages wouldn't you?

    <<addclass>> is independent of the passage, basically is just a shorthand macro for a javascript add class function. So it adds it until you remove the class.

    Good point! Though I guess you could always do it backwards (the tagged passages have it enabled whereas they all have his disabled) if only a few were supposed to have the sidebar. But your way is probably way easier if it's for a lot of passages. :)
  • Thanks you guys, I'm using Harlowe actually. Sorry for not mentioning that initially. However, I ended up figuring out how to do it with just removing all the undo/back button option by adding my own custom back button.
Sign In or Register to comment.