2012-03-22 14:33:15 +01:00
|
|
|
|
//Leency - 2012
|
2011-10-05 11:50:43 +02:00
|
|
|
|
|
|
|
|
|
dword onLeft(dword right,left) {EAX=Form.width-right-left;}
|
2012-07-16 13:58:24 +02:00
|
|
|
|
dword onTop(dword down,up) {EAX=Form.height-GetSkinHeight()-down-up;}
|
2011-10-05 11:50:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ShowMessage(dword message)
|
|
|
|
|
{
|
|
|
|
|
DrawFlatButton(Form.width/2-13,160,200,80,0,0xFFB6B5, message);
|
|
|
|
|
Pause(150);
|
|
|
|
|
List_ReDraw();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dword ConvertSize(dword bytes)
|
|
|
|
|
{
|
2012-11-15 23:03:43 +01:00
|
|
|
|
unsigned char size_prefix[8], size_nm[4];
|
|
|
|
|
if (bytes>=1073741824) copystr(" Gb",#size_nm);
|
|
|
|
|
else if (bytes>=1048576) copystr(" Mb",#size_nm);
|
|
|
|
|
else if (bytes>=1024) copystr(" Kb",#size_nm);
|
|
|
|
|
else copystr(" b ",#size_nm);
|
|
|
|
|
while (bytes>1023) bytes/=1024;
|
2011-10-05 11:50:43 +02:00
|
|
|
|
copystr(IntToStr(bytes),#size_prefix);
|
2012-11-15 23:03:43 +01:00
|
|
|
|
copystr(#size_nm,#size_prefix+strlen(#size_prefix));
|
|
|
|
|
return #size_prefix;
|
2011-10-05 11:50:43 +02:00
|
|
|
|
}
|
2012-05-27 13:37:20 +02:00
|
|
|
|
|
|
|
|
|
inline fastcall void TVScroll() { //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
dword on_y;
|
2012-11-15 23:03:43 +01:00
|
|
|
|
if (count<=0) {DrawFlatButton(onLeft(27,0),57,16,onTop(22,58),0,0xE4DFE1,""); return;}
|
2012-05-27 13:37:20 +02:00
|
|
|
|
on_y = za_kadrom * onTop(22,57) / count +57;
|
|
|
|
|
scroll_size=onTop(22,57) * but_num - but_num / count;
|
2012-11-15 23:03:43 +01:00
|
|
|
|
if (scroll_size<20) scroll_size = 20; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if (scroll_size>onTop(22,57)-on_y+56) || (za_kadrom+but_num>=count) on_y=onTop(23+scroll_size,0); //<2F><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-05-27 13:37:20 +02:00
|
|
|
|
DrawFlatButton(onLeft(27,0),on_y,16,scroll_size,0,0xE4DFE1,"");//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
DrawBar(onLeft(26,0),57,15,on_y-57,0xCED0D0);//<2F><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
DrawBar(onLeft(26,0),on_y+scroll_size+1,15,onTop(22,57)-scroll_size-on_y+56,0xCED0D0); //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
}
|