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

Support for Custom ScrollModes #158

Open
maxregan opened this issue Oct 6, 2021 · 2 comments · May be fixed by #159
Open

Support for Custom ScrollModes #158

maxregan opened this issue Oct 6, 2021 · 2 comments · May be fixed by #159

Comments

@maxregan
Copy link

maxregan commented Oct 6, 2021

Hello,

I'm currently working on a project where I have an amount of text that is slightly longer than my display. For this, I was planning to implement a custom "peek" scroll mode which scrolls back and forth just enough to show the content of the line.

Upon looking at the code, it looks like this would require a commit to SmartMatrix to add support, as there isn't currently a mechanism to supply a custom implementation. I'd like to help and am willing to submit patches, would the maintainers accept patches for one of the below? Which is preferred?

  1. Adding a new scroll mode directly to the enum and implement in LayerScrolling_impl.h
  2. Adding a new ScrollMode class with the appropriate hooks, and add my own scroll mode there
  3. Same as 2. but with additional refactoring to change the existing ScrollMode implementations to classes as well.

Thanks for the support and the excellent library!

@embedded-creations
Copy link
Contributor

Have you tried all the existing modes? It seems like there's a mode that works as you describe, but maybe not.

Scrolling text is one of the least important features for me right now, so I'll likely only accept a patch if it's updating Layer_Gfx_Mono_Impl.h (which has the most recent implementation of scrolling), and is very easy to review, test, and accept.

@maxregan
Copy link
Author

maxregan commented Oct 6, 2021

Thanks for the info. I believe I checked all of the existing scrolling modes already, and didn't find what I was looking for, but I'll check again.

I'll come back with a patch or close this issue.

@maxregan maxregan linked a pull request Oct 12, 2021 that will close this issue
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 a pull request may close this issue.

2 participants