Subversion Repositories Kolibri OS

Rev

Rev 975 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. #include "imgs\logo.txt"
  2.  
  3. ?define add_new_path 1
  4. ?define go_back 2
  5.  
  6. /*
  7. //IPC
  8. #include "lib\Nable_lib.h--"
  9. #include "lib\ipc.h--"
  10.  
  11. int pLoadedImage;
  12. void GetImage(dword ipath)
  13. {
  14.         IF (pLoadedImage) free(pLoadedImage);
  15.         pLoadedImage=loadimage_viaIPC(ipath, #CurrentImage);
  16.         SetEventMask(100111b); //restore normal event mask
  17. }
  18.  
  19. */
  20.  
  21.  
  22. void authors()
  23. {  
  24.         mouse mm;
  25.         byte letitclose=0;
  26.         SetEventMask(100111b);
  27.         loop() switch(WaitEvent())
  28.         {
  29.                 case evMouse:
  30.                                 mm.get();
  31.                                 //êóëüíî
  32.                                 IF (mm.x>85) && (mm.x<155) && (mm.y>190) && (mm.y<190+22)
  33.                                 IF (mm.lkm) {DrawRegion_3D(86,191,68,20,0xC7C7C7,0xFFFFFF); letitclose=1;}
  34.                                 ELSE {IF (letitclose) {DrawRegion_3D(86,191,68,20,0xFFFFFF,0xC7C7C7); Pause(7); ExitProcess();}}
  35.                                 ELSE IF (letitclose) {letitclose=0; DrawRegion_3D(86,191,68,20,0xFFFFFF,0xC7C7C7);}
  36.                                 break;
  37.                 case evButton: ExitProcess();
  38.                 case evKey: IF (GetKey()==27) ExitProcess(); break;
  39.                 case evReDraw:
  40.                         WindowRedrawStatus(1);
  41.                         DefineAndDrawWindow(500,200,181,256,0x34,0x10EFEBEF,0,0,"About Eolite");
  42.                         DrawBar(0,0,172,50,0x8494C4); //ãîëóáîå ñçàäè
  43.                         PutPaletteImage(#logo,85,85,48,7,#logo_pal);
  44.                         WriteText(33,100,0x80,0xBF40BF,"Eolite v0.98.3 RC1",0);
  45.                         WriteText(55,120,0x80,0,"Developers:",0);
  46.                         WriteText(39,130,0x80,0,"Leency & Veliant",0);
  47.                         WriteText(30,140,0x80,0,"Diamond, Lrz, Nable",0);
  48.                         WriteText(21,160,0x80,0,"Made using C-- in 2008",0);
  49.                         WriteText(18,170,0x80,0,"Visit www.kolibrios.org",0);
  50.                         DrawFlatButton(85,190,70,22,0,0xE4DFE1, "Close");
  51.                         WindowRedrawStatus(2);
  52.         }
  53. }
  54.  
  55.  
  56. void HistoryPath(byte action)
  57. {
  58.         IF (action==add_new_path)
  59.         {
  60.                 IF (strcmp(#PathHistory+find_symbol(#PathHistory,'|'),#path)==0) return;
  61.                 copystr("|",#PathHistory+strlen(#PathHistory));
  62.                 copystr(#path,#PathHistory+strlen(#PathHistory));
  63.         }
  64.         IF (action==go_back)
  65.         {
  66.                 WHILE (PathHistory[i]<>'|') { i--; };
  67.                 IF (i>0) PathHistory[i]=0x00;
  68.                 WHILE (PathHistory[i]<>'|')     { copystr(#PathHistory[i],#path); i--;  }
  69.                 IF (i>0) PathHistory[i]=0x00;
  70.         }
  71. }
  72.  
  73.  
  74. /*òèïà àíèìàöèÿ
  75. WHILE (m.lkm==1)
  76. {
  77.         Pause(10);
  78.         PutPaletteImage(p*16*15+#ficons,16,15,100,350,#ficons_pal);
  79.         IF (p>21) p=0; ELSE p++;
  80.         m.get();
  81. }*/
  82.  
  83.  
  84. dword onLeft(dword right,left) {EAX=Form.width-right-left;}
  85. dword onTop(dword down,up) {EAX=Form.height-skin_width-down-up;}
  86.  
  87.  
  88. dword ConvertSize(dword bytes)
  89. {
  90.         char size_prefix[7], temp[3];
  91.         IF (bytes>=1073741824) copystr(" Gb",#temp);
  92.         ELSE IF (bytes>=1048576) copystr(" Mb",#temp);
  93.         ELSE IF (bytes>=1024) copystr(" Kb",#temp);
  94.         ELSE copystr(" b ",#temp);
  95.         WHILE (bytes>1023) bytes/=1024;
  96.         copystr(IntToStr(bytes),#size_prefix);
  97.         copystr(#temp,#size_prefix+strlen(#size_prefix));
  98.         EAX=#size_prefix;
  99. }
  100.