add scrolling

This commit is contained in:
milang 2019-09-20 13:43:21 +02:00
parent 8ee982094c
commit bb6407e6c5
No known key found for this signature in database
GPG Key ID: D287C9D6C33D9035
1 changed files with 30 additions and 8 deletions

View File

@ -110,30 +110,52 @@ void ll_send(const char * txt)
}
}
void ll_display()
void ll_display_custom(log_line* line)
{
dclear(C_WHITE);
for (int i=0; i<8; i++)
{
#ifdef FX9860G
show_line(current_line, 63 - 8*i);
show_line(line, 63 - 8*(i+1));
#endif
#ifdef FXCG50
show_line(current_line, 224 - 13*i);
show_line(line, 224 - 13*(i+1));
#endif
current_line=current_line->previous;
if (!current_line)
line=line->previous;
if (!line)
break;
}
dupdate();
}
void ll_display()
{
ll_display_custom(current_line);
}
GNORETURN void ll_panic()
{
ll_display();
log_line* line=current_line;
while (1)
getkey();
{
ll_display_custom(line);
int key = getkey().key;
if (key==KEY_UP)
{
log_line* linet=line->previous;
if (linet)
line=linet;
}
if (key==KEY_DOWN)
{
log_line* linet=line->next;
if (linet)
line=linet;
}
}
}
void ll_set_panic()