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

Allow scrolling in credits screen with up/down keys #1402

Merged
merged 1 commit into from
May 21, 2020

Conversation

martinvanzijl
Copy link
Contributor

Fixes #1231. You can now scroll in the Credits screen using the up and down arrow keys. You can also skip ahead using the action or jump keys.

Demo below. Here I use the down, up action ("a" for my setup) and jump (space) keys:

credits-scroll-demo

Fixes SuperTux#1231.

All keyboard handling has been moved from TextScrollerScreen to
TextScroller.
@martinvanzijl
Copy link
Contributor Author

Further notes - there seem to be two scenarios in which a text-scroller object is used:

  1. A "textscroller" element is added directly to the level file. This is done in the Credits screen.

  2. Using the script function ("display_text_file("). An example of this is the first level in "Tux Strikes Back". This creates a new TextScrollerScreen object.

Keyboard handling was mostly done in TextScrollerScreen, but I have moved this to TextScroller, so that it works in both scenarios 1 and 2.

@tobbi tobbi merged commit b7791eb into SuperTux:master May 21, 2020
@tobbi
Copy link
Member

tobbi commented May 21, 2020

Looks good!

@martinvanzijl martinvanzijl deleted the issue-1231-scroll-in-credits branch May 21, 2020 16:41
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.

Can no longer use arrow keys to speed up credits screen
2 participants