24,22 → 24,18 |
:void sensor::draw_wrapper() |
{ |
DrawRectangle(x-1, y-1, w+1, h+1, sc.work_graph); |
DrawRectangle3D(x-2, y-2, w+3, h+3, sc.work_dark, sc.work_light); |
DrawRectangle3D(x-2, y-2, w+3, h+3, sc.work, sc.work_light); |
} |
|
:void sensor::draw_progress(dword progress_w, active_value, bg_value, mesure) |
:void sensor::draw_progress(dword progress_w) |
{ |
if (progress_w < MIN_PB_BLOCK_W) progress_w = MIN_PB_BLOCK_W; |
if (progress_w > w-MIN_PB_BLOCK_W) progress_w = w-MIN_PB_BLOCK_W; |
|
char textp[16]; |
DrawBar(x, y, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, PROGRESS_BG, 200)); |
DrawBar(x, y+1, w-progress_w, h-2, PROGRESS_ACTIVE); |
DrawBar(x, y+h-1, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, sc.work_graph, 200)); |
DrawBar(x+w-progress_w, y, progress_w, h, PROGRESS_BG); |
|
sprintf(#param, "%i%s", active_value, mesure); |
WriteText(w-progress_w- calc(strlen(#param)*8) /2 + x, h/2-7+y, 0x90, PROGRESS_BG, #param); |
|
DrawBar(x+w-progress_w, y, progress_w, h, PROGRESS_BG); |
sprintf(#param, "%i%s", bg_value, mesure); |
WriteText(-progress_w - calc(strlen(#param)*8)/2 + w+x, h/2-7+y, 0x90, PROGRESS_BG_TEXT, #param); |
strcpy(#textp, itoa(w-progress_w*100/w)); |
chrcat(#textp, '%'); |
WriteText(-strlen(#textp)*8 + w / 2 + x, h/2-7+y, 0x90, 0x000000, #textp); |
} |