Module scrolling_text

Module scrolling_text 

Source
Expand description

Support for scrolling ascii text horizontally.

§Example

use microbit::display::nonblocking::{Display, Frame, MicrobitFrame};
use microbit_text::scrolling::Animate;
use microbit_text::scrolling_text::ScrollingStaticText;
let mut display = MicrobitDisplay::new(...);
let mut scroller = ScrollingStaticText::default();
let frame = MicrobitFrame::default();
scroller.set_message(b"Hello, world!");
while !scroller.is_finished() {
    // every 50ms or so
    scroller.tick();
    frame.set(scroller);
    display.show_frame(frame);
}

Structs§

ScrollingBufferedText
A Scrollable displaying an ascii byte-string of up to N bytes.
ScrollingStaticText
A Scrollable displaying a static ascii byte-string slice.