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
create ability to check scrolling layer's position and possibly be able to pause/resume it #182
Comments
Actually, a "pause/resume" is already implemented (even if it wasn't intended to be such.) A quick test showed that the following code will pause the scrolling for 10 seconds simply by changing the speed to 0.
"Don't call it a bug and fix it. Leave it as-is and call it a feature!" |
This was the code I came up with for the time display on my project where I'm using the two suggested new functions of getPosition() and getTextWidth().
|
Exposing the text width and scroll position of a scrolling layer would be nice to have.
Use-case:
That would make the time scroll out to centered on the screen and then "freeze." A minute later, the time starts scrolling again to the right and disappears.
Adding scroll.pause() and scroll.resume() functions as well would make the above sample even easier as there'd be no mucking about with the indexed layer and saving the position, etc. It would be just:
Other use-cases would include a sign that scrolls across "Now serving #12. Now serving #12" and as each "#12" reaches the middle, and indexed later above it prints "#12" in a different color, pauses, clears it and then resumes the scroll. Thus making it more noticeable via the blink (written as I look at my own ticket with # 4633668346 on it, sigh and try to remember if I still have that pillow in the car since I'm going to be here for a while.)
The text was updated successfully, but these errors were encountered: