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

Conversation

Projects
None yet
2 participants
@NQNStudios
Copy link
Collaborator

commented Dec 12, 2017

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

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 12, 2017

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 added a commit that referenced this pull request Dec 14, 2017

Manually merged PR #42: Back Button
- 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 referenced this pull request Dec 14, 2017

Closed

Back Button #36

@NQNStudios NQNStudios deleted the NQNStudios:back-button branch Dec 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.