Experimenting with text effects: easy drop shadow, scrolling one line, and scrolling a long message.
Hey @kay! Thanks for putting this togeter - it looks great! Pixlet doesn’t offer drop shadow, but we do offer the Marquee
widget for vertical or horizontal scroll: https://github.com/tidbyt/pixlet/blob/main/doc/widgets.md#marquee
Looks like we might not offer as much flexibility as your demo, but maybe we should?
@mark I can’t get vertical scroll to work. The following shows a static image. It works if I remove scroll_direction=“vertical”,
My guess is it’s handling newlines wrong.
load("render.star", "render")
def main():
message="""(something with many lines)
2
3
4
5
6
7
8
"""
return render.Root(
child=render.Marquee(
width=64,
height=32,
child=render.Text(message),
offset_start=5,
offset_end=32,
scroll_direction="vertical",
)
)
@kay I believe the Marquee child element in your example should be WrappedText, as Text renders on a single line according to the widget definition. It works for me with that change.
edit - I should add that it does begin to scroll vertically, but cuts off before the end, as I think there may be a separate bug related to height of WrappedText within Marquee.