Howdy, Stranger!

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

Change "undo" button to "back" button in only SOME passages

edited December 2015 in Help! with 2.0
Is there a way for me to change the undo button to a back button (a button that saves any changed values), but only on my inventory page? I need the back functionality to allow users to change their equipped items. Thanks!

Comments

  • I suggest reading the Change "Undo" to "Go back" in Harlowe thread, it covers the some of the issues of modifying the functionality of Harlowe's undo button.

    If that thread does not answer your questions then I suggest creating a new Issue on Harlowe's project website asking of an enhancement which allows an Author the ability to navigate the story to a new passage using Javascript.
  • That didn't really help, but I do have an idea that consists of $prevPassage where $prevPassage will be set to the title of the previous passage. However variables in passages are not working like that... I think there may be another way though.
  • In order to be able to link to a variable you need to use the (link-goto:) macro. Though in this case you don't have to use a variable since you can use the (history:) macro to get the name of the last visited passage. So to do what you want you'd use:
    (link-goto: "Close Inventory", (history:)'s last)
    
  • graywolf wrote: »
    That didn't really help, but I do have an idea that consists of $prevPassage where $prevPassage will be set to the title of the previous passage. However variables in passages are not working like that... I think there may be another way though.

    Got this working
Sign In or Register to comment.