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

Add ability to limit area of scrolling text. Scrolling enhance #730

Closed
StarveTheEgo opened this issue Mar 7, 2019 · 4 comments
Closed

Comments

@StarveTheEgo
Copy link

StarveTheEgo commented Mar 7, 2019

Is your feature request related to a problem? Please describe.
I would like to add scrolling text via video.add_text function (this is currently possible)
I would like to have this text to scroll on some limited area. Like, i can dedicate some part of screen for this and scroll text only in that small part of screen. Currently text is scrolling on the full width of frame, so the thing i want to achieve is impossible currently

Describe the solution you'd like
Probably add arguments:
width - scrolling width / text area width. Default value is frame width
height - scrolling height / text area height. Default value is... font size? Not sure tho

And maybe replace speed with:
x_speed - scrolling speed on X axis. Default value is 0
y_speed - scrolling speed on Y axis. Default value is 0
^ In order to allow vertical scrolling too

Additional context

I think if you guys are overloaded i can try to learn this OCaml and join to help, since i am programmer
But not sure yet :D

And, sorry for unrelated question: when will be next version released? I am not familiar with conventions of this project. Like, maybe you release every [xx] features or months or... is there public roadmap? Thanks forward!

@smimram
Copy link
Member

smimram commented Mar 8, 2019

I think that an even better solution would be to have functions so that the user can specify pretty much any dynamic placement of text. I'll try to have a look at it.

@smimram smimram closed this as completed in d74b255 Mar 9, 2019
@smimram
Copy link
Member

smimram commented Mar 9, 2019

Ok, so you can now do:

y = ref(0)

def ty () =
  y := !y-1;
  if !y <= -100 then y := 0 end;
  !y
end

s = single("test.avi")
s = video.add_text(x=0, y=ty, speed=0, size=40, "Hello world!", s)
s = mksafe(s)

output.sdl(s)

which allows you to program whatever function for x and y. For the text it was already the case, you can use a similar logic with references to update it!

@StarveTheEgo
Copy link
Author

Nice! So i can improve Deer Radio now!

@toots
Copy link
Member

toots commented Mar 14, 2019

Thanks @sam! Would you mind adding a Changelog entry for it?

smimram added a commit that referenced this issue Apr 10, 2019
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

No branches or pull requests

3 participants