Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Back button #42

Merged
merged 20 commits into from
Dec 14, 2017
Merged

Back button #42

merged 20 commits into from
Dec 14, 2017

Conversation

NQNStudios
Copy link
Collaborator

Addresses issue #36

Changes proposed by this pull request:

  • Core has a new function, GotoLastSection
  • Compiler injects every section div with a special link with data-call-function="Core.GotoLastSection"
    • Fixed a bug where some function links couldn't use . access
  • Core.ExpandSection can optionally strip the back button from its output. This is done when expanding inline sections.
  • The back button has infinite history, and returns the player to the previous section exactly as it was before it was left.
  • The back button calls the same OnGotoSection callback, which has been extended with another parameter specifying whether it was a normal link, or the back button, which triggered the move.

@invicticide to review

@NQNStudios
Copy link
Collaborator Author

Possible improvement could be allowing custom placement of the back button in the html template, and only creating one link which is always present outside of the currentSection div. That way, the modification to ExpandSection would be rendered unnecessary.

@invicticide invicticide merged commit 86129a7 into invicticide:dev Dec 14, 2017
invicticide pushed a commit that referenced this pull request Dec 14, 2017
- Resolved merge conflict in template header
- Renamed GotoLastSection -> GotoPreviousSection for clarity
- Floated back button to the left of the header in the basic example
- Minor tweaks and cleanup
@invicticide invicticide mentioned this pull request Dec 14, 2017
@NQNStudios NQNStudios deleted the back-button branch December 21, 2017 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants