2013-03-11 19:16:24 +01:00
|
|
|
#define MEMSIZE 0x3E80
|
2015-08-02 00:08:58 +02:00
|
|
|
|
|
|
|
#include "../lib/io.h"
|
2013-02-04 14:15:13 +01:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2015-08-02 00:19:10 +02:00
|
|
|
int id, key, i;
|
|
|
|
dword file;
|
2015-08-02 00:08:58 +02:00
|
|
|
mem_Init();
|
2015-08-02 00:19:10 +02:00
|
|
|
io.dir_buffer("/sys/",DIR_ONLYREAL);
|
2013-02-04 14:15:13 +01:00
|
|
|
loop()
|
|
|
|
{
|
|
|
|
switch(WaitEvent())
|
|
|
|
{
|
|
|
|
case evButton:
|
|
|
|
id=GetButtonID();
|
|
|
|
if (id==1) ExitProcess();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case evKey:
|
|
|
|
key = GetKey();
|
2015-07-22 20:32:54 +02:00
|
|
|
if (key==013){ //Enter
|
2015-08-02 00:19:10 +02:00
|
|
|
draw_window();
|
|
|
|
WriteText(50,90,0x80,0xFF00FF,io.dir_position(i));
|
|
|
|
if(i<io.dir.count)i++;
|
2013-02-04 14:15:13 +01:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case evReDraw:
|
|
|
|
draw_window();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void draw_window()
|
|
|
|
{
|
2013-03-11 19:16:24 +01:00
|
|
|
proc_info Form;
|
2013-02-04 14:15:13 +01:00
|
|
|
DefineAndDrawWindow(215,100,250,200,0x34,0xFFFFFF,"Window header");
|
2013-03-11 19:16:24 +01:00
|
|
|
GetProcessInfo(#Form, SelfInfo);
|
2014-03-30 13:57:13 +02:00
|
|
|
WriteText(10,110,0x80,0,#param);
|
2013-02-04 14:15:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
stop:
|