Subversion Repositories Kolibri OS

Rev

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

  1. //Leency - 2011
  2.  
  3. #include "imgs\logo.txt"
  4.  
  5. #define REDRAW  1
  6. #define ANIM    2
  7. #define NOTIP   3
  8.  
  9. #define BROWSER_PATH    "/sys/htmlv"
  10. #define BROWSER_LINK    "http://www.kolibri-os.narod.ru"
  11.  
  12.  
  13. void authors()
  14. {  
  15.         byte p;
  16.         mouse mm;
  17.         byte id, letitclose=0;
  18.         SetEventMask(100111b);
  19.         loop() switch(WaitEvent())
  20.         {
  21.                 case evMouse:
  22.                                 mm.get();
  23.                                 //êóëüíî
  24.                                 IF (mm.x>85) && (mm.x<155) && (mm.y>190) && (mm.y<190+22)
  25.                                 IF (mm.lkm) {DrawRegion_3D(86,191,68,20,0xC7C7C7,0xFFFFFF); letitclose=1;}
  26.                                 ELSE {IF (letitclose) {DrawRegion_3D(86,191,68,20,0xFFFFFF,0xC7C7C7); Pause(7); ExitProcess();}}
  27.                                 ELSE IF (letitclose) {letitclose=0; DrawRegion_3D(86,191,68,20,0xFFFFFF,0xC7C7C7);}
  28.  
  29.                                 /*WHILE (mm.lkm==1) //àíèìàöûÿ Ûûûû)))
  30.                                 {
  31.                                         PutPaletteImage(p*16*15+#ficons,16,15,30,192,#ficons_pal);
  32.                                         IF (p>23) p=0; ELSE p++;
  33.                                         Pause(25);
  34.                                         mm.get();
  35.                                 }*/
  36.                                
  37.                                 break;
  38.                 case evButton:
  39.                                 id=GetButtonID();
  40.                                 IF (id==1) ExitProcess();
  41.                                 IF (id==23) RunProgram(BROWSER_PATH, BROWSER_LINK);
  42.                                 break;
  43.                 case evKey:
  44.                                 IF (GetKey()==27) ExitProcess();
  45.                                 break;
  46.                 case evReDraw:
  47.                                 WindowRedrawStatus(1);
  48.                                 DefineAndDrawWindow(500,200,181,256,0x34,0x10EFEBEF,0,0,"About Eolite");
  49.                                 DrawBar(0,0,172,50,0x8494C4); //ãîëóáîå ñçàäè
  50.                                 PutPaletteImage(#logo,85,85,43,7,#logo_pal);
  51.                                 WriteText(33,100,0x80,0xBF40BF,"Eolite v0.99.8 RC3",0);
  52.                                 WriteText(55,120,0x80,0,"Developers:",0);
  53.                                 WriteText(39,130,0x80,0,"Leency & Veliant",0);
  54.                                 WriteText(30,140,0x80,0,"Diamond, Lrz, Nable",0);
  55.                                 WriteText(55,150,0x80,0," 2008-2011 ",0);
  56.                                 WriteText(12,170,0x80,0,"Visit",0);
  57.                                 DrawLink(48,170,23, "kolibri-os.narod.ru"); //ññûëêa
  58.                                 DrawFlatButton(85,190,70,22,0,0xE4DFE1, "Close");
  59.                                 WindowRedrawStatus(2);
  60.         }
  61. }
  62.  
  63. void DrawLink(dword x,y,btn_id, inscription)
  64. {
  65.         WriteText(x,y,0x80,0x4E00E7,inscription,0);
  66.         DrawBar(x,y+8,strlen(inscription)*6,1,0x4E00E7); //ïîä÷åðêíóòü ññûëêó
  67.         DefineButton(x-1,y-1,strlen(inscription)*6,10,btn_id+BT_HIDE,0);
  68. }
  69.  
  70.  
  71. #define add_new_path 1
  72. #define go_back 2
  73.  
  74. void HistoryPath(byte action)
  75. {
  76.         if (action==add_new_path)
  77.         {
  78.                 IF (strcmp(#PathHistory+find_symbol(#PathHistory,'|'),#path)==0) return;
  79.                 IF (strlen(#PathHistory)+strlen(#path)>2560)
  80.                 {
  81.                         copystr(#PathHistory+1024,#PathHistory);
  82.                         copystr("/",#PathHistory+strlen(#PathHistory));
  83.                 }
  84.                 copystr("|",#PathHistory+strlen(#PathHistory));
  85.                 copystr(#path,#PathHistory+strlen(#PathHistory));
  86.         }
  87.         if (action==go_back)
  88.         {
  89.                 i=strlen(#PathHistory)-1;
  90.                 WHILE (PathHistory[i]<>'|') { i--; };
  91.                 IF (i>0) PathHistory[i]=0x00;
  92.                 WHILE (PathHistory[i]<>'|')     { copystr(#PathHistory[i],#path); i--;  }
  93.                 IF (i>0) PathHistory[i]=0x00;
  94.         }
  95. }
  96.  
  97.  
  98. dword onLeft(dword right,left) {EAX=Form.width-right-left;}
  99. dword onTop(dword down,up) {EAX=Form.height-GetSkinWidth()-down-up;}
  100.  
  101.  
  102. void ShowMessage(dword message)
  103. {
  104.         DrawFlatButton(Form.width/2-13,160,200,80,0,0xFFB6B5, message);
  105.         Pause(150);
  106.         List_ReDraw();
  107. }
  108.  
  109.  
  110. dword ConvertSize(dword bytes)
  111. {
  112.         byte size_prefix[8], temp[3];
  113.         IF (bytes>=1073741824) copystr(" Gb",#temp);
  114.         ELSE IF (bytes>=1048576) copystr(" Mb",#temp);
  115.         ELSE IF (bytes>=1024) copystr(" Kb",#temp);
  116.         ELSE copystr(" b ",#temp);
  117.         WHILE (bytes>1023) bytes/=1024;
  118.         copystr(IntToStr(bytes),#size_prefix);
  119.         copystr(#temp,#size_prefix+strlen(#size_prefix));
  120.         EAX=#size_prefix;
  121. }
  122.