forked from len0rd/rockbox
lcd-common/scroll_engine: Introduce lcd_putsxy_scroll_func().
This function supports installing a custom scroll callback. This will be called when the scrollengine redraws the line. It allows to draw extended styles (or anything your can possible imagine) along with the text. It is also strictly pixel-based, the first pixel-based function that supports scrolling. Change-Id: I57f81ac7b3d08b877aea4cb8afa882f175ebcdfc
This commit is contained in:
parent
b8505222c0
commit
6630958533
6 changed files with 36 additions and 1 deletions
|
@ -563,6 +563,16 @@ void lcd_puts_scroll_worker(int x, int y, const unsigned char *string,
|
|||
lcd_scroll_info.lines++;
|
||||
}
|
||||
|
||||
void lcd_putsxy_scroll_func(int x, int y, const unsigned char *string,
|
||||
void (*scroll_func)(struct scrollinfo *),
|
||||
void *data, int x_offset)
|
||||
{
|
||||
if (!scroll_func)
|
||||
lcd_putsxyofs(x, y, x_offset, string);
|
||||
else
|
||||
lcd_puts_scroll_worker(x, y, string, x_offset, scroll_func, data);
|
||||
}
|
||||
|
||||
void lcd_scroll_fn(struct scrollinfo* s)
|
||||
{
|
||||
lcd_putsxyofs(s->x, s->y, s->offset, s->line);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue