forked from KolibriOS/kolibrios
cmm: update libs, fixed itoa
git-svn-id: svn://kolibrios.org@3114 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a7e652271e
commit
8f354bd99d
@ -57,3 +57,23 @@ void CheckBox(dword x,y,w,h, bt_id, text, graph_color, text_color, is_checked)
|
|||||||
DrawBar(x+2, y+2, w-3, h-3, 0xffffff);
|
DrawBar(x+2, y+2, w-3, h-3, 0xffffff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DrawProgressBar(dword st_x, st_y, st_w, st_h, col_fon, col_border, col_fill, col_text, progress_percent, status_text)
|
||||||
|
{
|
||||||
|
int progress_w = progress_percent * st_w / 100 - 3;
|
||||||
|
static int fill_old;
|
||||||
|
|
||||||
|
if (!progress_percent) {DrawBar(st_x,st_y, st_x + st_y + fill_old + 15,st_h+1, col_fon); return;}
|
||||||
|
|
||||||
|
DrawRectangle(st_x, st_y, st_w,st_h, col_border);
|
||||||
|
DrawRectangle3D(st_x+1, st_y+1, st_w-2,st_h-2, 0xFFFfff, 0xFFFfff);
|
||||||
|
if (progress_percent) DrawBar(st_x+2, st_y+2, progress_w, st_h-3, col_fill);
|
||||||
|
if (progress_percent<100) DrawBar(st_x+2+progress_w, st_y+2, st_w-progress_w-3, st_h-3, 0xFFFfff);
|
||||||
|
|
||||||
|
if (status_text)
|
||||||
|
{
|
||||||
|
DrawBar(st_x+st_w+15, st_h/2-4+st_y, fill_old, 9, col_fon);
|
||||||
|
WriteText(st_x+st_w+15, st_h/2-4+st_y, 0x80, col_text, status_text);
|
||||||
|
fill_old = strlen(status_text) * 6;
|
||||||
|
}
|
||||||
|
}
|
@ -219,6 +219,13 @@ inline fastcall int GetActiveProcess()
|
|||||||
$int 0x40
|
$int 0x40
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline fastcall void ActivateWindow( ECX)
|
||||||
|
{
|
||||||
|
EAX = 18;
|
||||||
|
EBX = 3;
|
||||||
|
$int 0x40
|
||||||
|
}
|
||||||
|
|
||||||
inline fastcall int CreateThread( ECX,EDX)
|
inline fastcall int CreateThread( ECX,EDX)
|
||||||
{
|
{
|
||||||
$mov eax,51
|
$mov eax,51
|
||||||
|
@ -114,6 +114,8 @@ inline fastcall strcat( EDI, ESI)
|
|||||||
dword itoa( ESI)
|
dword itoa( ESI)
|
||||||
{
|
{
|
||||||
unsigned char buffer[11];
|
unsigned char buffer[11];
|
||||||
|
$pusha
|
||||||
|
|
||||||
EDI = #buffer;
|
EDI = #buffer;
|
||||||
ECX = 10;
|
ECX = 10;
|
||||||
if (ESI < 0)
|
if (ESI < 0)
|
||||||
@ -140,7 +142,8 @@ F3:
|
|||||||
$mov al, '\0'
|
$mov al, '\0'
|
||||||
$stosb
|
$stosb
|
||||||
|
|
||||||
return #buffer;
|
$popa
|
||||||
|
return #buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -58,9 +58,7 @@ void Console_Work()
|
|||||||
add_disk.DiskSize = GetFreeRAM() / 5;
|
add_disk.DiskSize = GetFreeRAM() / 5;
|
||||||
debug("disk size is not specified");
|
debug("disk size is not specified");
|
||||||
strcpy(#size_t, "10% from free RAM will be used, new DiskSize: ");
|
strcpy(#size_t, "10% from free RAM will be used, new DiskSize: ");
|
||||||
driver_rezult=itoa(add_disk.DiskSize/2048);
|
strcat(#size_t, itoa(add_disk.DiskSize/2048));
|
||||||
strcat(#size_t, driver_rezult);
|
|
||||||
//strcat(#size_t, itoa(add_disk.DiskSize/2048));
|
|
||||||
strcat(#size_t, " MB");
|
strcat(#size_t, " MB");
|
||||||
debug(#size_t);
|
debug(#size_t);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user