Код (Отобразить)
CODE:
function Set_Loading()
{
char BLENDFUNCTION[4] = {0, 0, 20, 0}
int ftn = codhexi(#BLENDFUNCTION[0], 4);
int Display_Color, Display_Width, Display_Height;
getdisplay(Display_Color, Display_Width, Display_Height);
int font = CreateFont(14, 0, 0, 0, 100, 0, 0, 0, RUSSIAN_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, CLEARTYPE_QUALITY, FF_DONTCARE, "Arial");
int coord_rectangle[4] = {Display_Width/2-160, Display_Height/2-100, 300, 130};
int hdc, DC, bitmapDC;
hdc = GetDC(0);
DC = CreateCompatibleDC(hdc);
bitmapDC = CreateCompatibleBitmap(hdc, coord_rectangle[2], coord_rectangle[3]);
SelectObject(DC, bitmapDC);
int Select_Pen1, Select_Brush1;
int Object_Pen1, Object_Brush1;
string temp_fold = tempfolder();
string path_fold = pathfolder();
char TRIVERTEX[64];
int coord[8] = {20, 55, 280, 65, 20, 55, 280, 65};
int color[4] = {3329330, 0, 9470064, 65539};
int rect[4] = {0, 1, 2, 3};
int num = 33;//100 процентов делим на 3 изображения
Object_Pen1 = CreatePen(PS_INSIDEFRAME, 2, 6908265);
Object_Brush1 = CreateSolidBrush(16777215);
for(int i=0; i<=coord[2]-coord[0]; i=i+(coord[2]-coord[0])/100)
{
int percent = i/(coord[2]-coord[0])*100;
coord[4] = coord[0]+i;
for(int s=0; s<2; s++)
{
codhex(coord[s*4], #TRIVERTEX[s*32]);
codhex(coord[s*4+1], #TRIVERTEX[s*32+4]);
codhex(rvalue(color[s*2]) * 256, #TRIVERTEX[s*32+8]);
codhex(gvalue(color[s*2]) * 256, #TRIVERTEX[s*32+10]);
codhex(bvalue(color[s*2]) * 256, #TRIVERTEX[s*32+12]);
codhex(coord[s*4+2], #TRIVERTEX[s*32+16]);
codhex(coord[s*4+3], #TRIVERTEX[s*32+20]);
codhex(rvalue(color[s*2+1]) * 256, #TRIVERTEX[s*32+24]);
codhex(gvalue(color[s*2+1]) * 256, #TRIVERTEX[s*32+26]);
codhex(bvalue(color[s*2+1]) * 256, #TRIVERTEX[s*32+28]);
}
for (int g=percent; g>=num; g++)
{
string Text_Loading = "Unpack: C:\...\Temp\Image_"+format(percent/33-1);
num = num+33;
TextOut(DC, 20, 70, Text_Loading, size(Text_Loading)+1);
unpack(path_fold+"\Image_"+format(percent/33-1)+".bmp", temp_fold+"Image_"+format(percent/33-1)+".bmp", 0);
break;
}
Select_Pen1 = SelectObject(DC, Object_Pen1);
Select_Brush1 = SelectObject(DC, Object_Brush1);
Rectangle(DC, 0, 0, coord_rectangle[2], coord_rectangle[3]);
SetTextColor(DC, 255);
SetBkMode(DC, 1);
TextOut(DC, 120, 10, "K2019Bot", 8);
TextOut(DC, 240, 70, format(percent)+"%", size(format(percent))+1);
int old_font = SelectObject (DC, font);
TextOut(DC, 20, 70, Text_Loading, size(Text_Loading)+1);
SelectObject (DC, old_font);
GradientFill(DC, address(#TRIVERTEX[0]), 4, address(#rect[0]), 2, GRADIENT_FILL_RECT_V);
if(i == 0)
{
looptime(4000)
{
AlphaBlend(hdc, coord_rectangle[0], coord_rectangle[1], coord_rectangle[2], coord_rectangle[3],
DC, 0, 0, coord_rectangle[2], coord_rectangle[3], ftn);
sleep(1);
}
}
looptime(10)
{
BitBlt(hdc, coord_rectangle[0], coord_rectangle[1], coord_rectangle[2], coord_rectangle[3], DC, 0, 0, SRCCOPY);
sleep(1);
}
if(percent == 100)
{
looptime(4000)
{
BitBlt(hdc, coord_rectangle[0], coord_rectangle[1], coord_rectangle[2], coord_rectangle[3], DC, 0, 0, SRCCOPY);
sleep(1);
}
SelectObject(DC, Select_Pen1);
SelectObject(DC, Select_Brush1);
DeleteDC(DC);
DeleteObject(bitmapDC);
ReleaseDC(0, hdc);
}
}
}
{
char BLENDFUNCTION[4] = {0, 0, 20, 0}
int ftn = codhexi(#BLENDFUNCTION[0], 4);
int Display_Color, Display_Width, Display_Height;
getdisplay(Display_Color, Display_Width, Display_Height);
int font = CreateFont(14, 0, 0, 0, 100, 0, 0, 0, RUSSIAN_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, CLEARTYPE_QUALITY, FF_DONTCARE, "Arial");
int coord_rectangle[4] = {Display_Width/2-160, Display_Height/2-100, 300, 130};
int hdc, DC, bitmapDC;
hdc = GetDC(0);
DC = CreateCompatibleDC(hdc);
bitmapDC = CreateCompatibleBitmap(hdc, coord_rectangle[2], coord_rectangle[3]);
SelectObject(DC, bitmapDC);
int Select_Pen1, Select_Brush1;
int Object_Pen1, Object_Brush1;
string temp_fold = tempfolder();
string path_fold = pathfolder();
char TRIVERTEX[64];
int coord[8] = {20, 55, 280, 65, 20, 55, 280, 65};
int color[4] = {3329330, 0, 9470064, 65539};
int rect[4] = {0, 1, 2, 3};
int num = 33;//100 процентов делим на 3 изображения
Object_Pen1 = CreatePen(PS_INSIDEFRAME, 2, 6908265);
Object_Brush1 = CreateSolidBrush(16777215);
for(int i=0; i<=coord[2]-coord[0]; i=i+(coord[2]-coord[0])/100)
{
int percent = i/(coord[2]-coord[0])*100;
coord[4] = coord[0]+i;
for(int s=0; s<2; s++)
{
codhex(coord[s*4], #TRIVERTEX[s*32]);
codhex(coord[s*4+1], #TRIVERTEX[s*32+4]);
codhex(rvalue(color[s*2]) * 256, #TRIVERTEX[s*32+8]);
codhex(gvalue(color[s*2]) * 256, #TRIVERTEX[s*32+10]);
codhex(bvalue(color[s*2]) * 256, #TRIVERTEX[s*32+12]);
codhex(coord[s*4+2], #TRIVERTEX[s*32+16]);
codhex(coord[s*4+3], #TRIVERTEX[s*32+20]);
codhex(rvalue(color[s*2+1]) * 256, #TRIVERTEX[s*32+24]);
codhex(gvalue(color[s*2+1]) * 256, #TRIVERTEX[s*32+26]);
codhex(bvalue(color[s*2+1]) * 256, #TRIVERTEX[s*32+28]);
}
for (int g=percent; g>=num; g++)
{
string Text_Loading = "Unpack: C:\...\Temp\Image_"+format(percent/33-1);
num = num+33;
TextOut(DC, 20, 70, Text_Loading, size(Text_Loading)+1);
unpack(path_fold+"\Image_"+format(percent/33-1)+".bmp", temp_fold+"Image_"+format(percent/33-1)+".bmp", 0);
break;
}
Select_Pen1 = SelectObject(DC, Object_Pen1);
Select_Brush1 = SelectObject(DC, Object_Brush1);
Rectangle(DC, 0, 0, coord_rectangle[2], coord_rectangle[3]);
SetTextColor(DC, 255);
SetBkMode(DC, 1);
TextOut(DC, 120, 10, "K2019Bot", 8);
TextOut(DC, 240, 70, format(percent)+"%", size(format(percent))+1);
int old_font = SelectObject (DC, font);
TextOut(DC, 20, 70, Text_Loading, size(Text_Loading)+1);
SelectObject (DC, old_font);
GradientFill(DC, address(#TRIVERTEX[0]), 4, address(#rect[0]), 2, GRADIENT_FILL_RECT_V);
if(i == 0)
{
looptime(4000)
{
AlphaBlend(hdc, coord_rectangle[0], coord_rectangle[1], coord_rectangle[2], coord_rectangle[3],
DC, 0, 0, coord_rectangle[2], coord_rectangle[3], ftn);
sleep(1);
}
}
looptime(10)
{
BitBlt(hdc, coord_rectangle[0], coord_rectangle[1], coord_rectangle[2], coord_rectangle[3], DC, 0, 0, SRCCOPY);
sleep(1);
}
if(percent == 100)
{
looptime(4000)
{
BitBlt(hdc, coord_rectangle[0], coord_rectangle[1], coord_rectangle[2], coord_rectangle[3], DC, 0, 0, SRCCOPY);
sleep(1);
}
SelectObject(DC, Select_Pen1);
SelectObject(DC, Select_Brush1);
DeleteDC(DC);
DeleteObject(bitmapDC);
ReleaseDC(0, hdc);
}
}
}