Subversion Repositories Kolibri OS

Rev

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

  1. //Leency - 2012
  2.  
  3. dword onLeft(dword right,left) {EAX=Form.width-right-left;}
  4. dword onTop(dword down,up) {EAX=Form.height-GetSkinWidth()-down-up;}
  5.  
  6.  
  7. void ShowMessage(dword message)
  8. {
  9.         DrawFlatButton(Form.width/2-13,160,200,80,0,0xFFB6B5, message);
  10.         Pause(150);
  11.         List_ReDraw();
  12. }
  13.  
  14.  
  15. dword ConvertSize(dword bytes)
  16. {
  17.         byte size_prefix[8], temp[3];
  18.         IF (bytes>=1073741824) copystr(" Gb",#temp);
  19.         ELSE IF (bytes>=1048576) copystr(" Mb",#temp);
  20.         ELSE IF (bytes>=1024) copystr(" Kb",#temp);
  21.         ELSE copystr(" b ",#temp);
  22.         WHILE (bytes>1023) bytes/=1024;
  23.         copystr(IntToStr(bytes),#size_prefix);
  24.         copystr(#temp,#size_prefix+strlen(#size_prefix));
  25.         EAX=#size_prefix;
  26. }
  27.