Example.c update

git-svn-id: svn://kolibrios.org@5641 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
pavelyakov 2015-08-01 22:19:10 +00:00
parent 211966e1dd
commit 110a703c5e

View File

@ -1,13 +1,13 @@
#define MEMSIZE 0x3E80 #define MEMSIZE 0x3E80
#include "../lib/io.h" #include "../lib/io.h"
#include "../lib/draw.h"
void main() void main()
{ {
int id, key; int id, key, i;
dword file;
mem_Init(); mem_Init();
io.set("/sys/RUN",ATR_HIDDEN); io.dir_buffer("/sys/",DIR_ONLYREAL);
loop() loop()
{ {
switch(WaitEvent()) switch(WaitEvent())
@ -20,7 +20,9 @@ void main()
case evKey: case evKey:
key = GetKey(); key = GetKey();
if (key==013){ //Enter if (key==013){ //Enter
WriteText(50,90,0x80,0xFF00FF,"Pressed Enter"); draw_window();
WriteText(50,90,0x80,0xFF00FF,io.dir_position(i));
if(i<io.dir.count)i++;
} }
break; break;
@ -33,13 +35,8 @@ void main()
void draw_window() void draw_window()
{ {
proc_info Form; proc_info Form;
dword pos;
//float zz=0.944,ret;
DefineAndDrawWindow(215,100,250,200,0x34,0xFFFFFF,"Window header"); DefineAndDrawWindow(215,100,250,200,0x34,0xFFFFFF,"Window header");
//draw.gradient(pos,10,10,0x0,20,20,0x0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
draw.circle(60,60,5);
WriteText(10,110,0x80,0,#param); WriteText(10,110,0x80,0,#param);
} }