add scrolling
This commit is contained in:
parent
8ee982094c
commit
bb6407e6c5
38
liblog.c
38
liblog.c
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue