/programs/cmm/lib/gui/checkbox.h |
---|
61,17 → 61,17 |
:void checkbox::draw(dword _x,_y) |
{ |
#define SIZE 14 |
dword text_col = system.color.work_text; |
dword text_col = sc.work_text; |
if (!id) id = GetFreeButtonId(); |
x=_x; y=_y; |
DefineButton(x-1, y-1, strlen(text)*8 + SIZE + 17, SIZE+2, id+BT_HIDE+BT_NOFRAME, 0); |
DrawRectangle(x, y, SIZE, SIZE, system.color.work_graph); |
DrawRectangle(x, y, SIZE, SIZE, sc.work_graph); |
if (disabled) |
{ |
DrawRectangle(x+1, y+1, SIZE-2, SIZE-2, 0xffffff); |
DrawBar(x+2, y+2, SIZE-3, SIZE-3, 0xCCCccc); |
text_col = MixColors(system.color.work, system.color.work_text, 128); |
text_col = MixColors(sc.work, sc.work_text, 128); |
} |
else if (checked == false) |
{ |
82,8 → 82,8 |
{ |
_PutImage(x+1, y+1, 13, 13, #checkbox_flag); |
} |
if (text) WriteTextWithBg(x+SIZE+8, SIZE / 2 + y -7, 0xD0, text_col, text, system.color.work); |
DrawRectangle3D(x-1,y-1,SIZE+2,SIZE+2,system.color.work_dark,system.color.work_light); |
if (text) WriteTextWithBg(x+SIZE+8, SIZE / 2 + y -7, 0xD0, text_col, text, sc.work); |
DrawRectangle3D(x-1,y-1,SIZE+2,SIZE+2,sc.work_dark,sc.work_light); |
} |
:void checkbox::redraw() |
/programs/cmm/lib/gui/more_less_box.h |
---|
49,7 → 49,7 |
check_values(); |
x=_x; y=_y; |
DrawRectangle(x, y, VALUE_FIELD_W+1, SIZE, system.color.work_graph); |
DrawRectangle(x, y, VALUE_FIELD_W+1, SIZE, sc.work_graph); |
DrawRectangle3D(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xDDDddd, 0xffffff); |
if (disabled) |
56,20 → 56,20 |
{ |
DrawRectangle(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xffffff); |
DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xCCCccc); |
text_col = system.color.work_graph; |
text_col = sc.work_graph; |
} |
else |
{ |
DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xffffff); |
text_col = system.color.work_text; |
text_col = sc.work_text; |
} |
WriteText( -strlen(value_text)+3*8 + x+6, SIZE / 2 + y -6, 0x90, 0x333333, value_text); |
DrawCaptButton(VALUE_FIELD_W + x + 1, y, SIZE, SIZE, id_inc, system.color.work_button, system.color.work_button_text, "+"); |
DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, id_dec, system.color.work_button, system.color.work_button_text, "-"); |
WriteTextWithBg(x+VALUE_FIELD_W+SIZE+SIZE+10, SIZE / 2 + y -7, 0xD0, text_col, text, system.color.work); |
DrawRectangle3D(x-1,y-1,VALUE_FIELD_W+SIZE+SIZE+2,SIZE+2,system.color.work_dark,system.color.work_light); |
DrawCaptButton(VALUE_FIELD_W + x + 1, y, SIZE, SIZE, id_inc, sc.button, sc.button_text, "+"); |
DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, id_dec, sc.button, sc.button_text, "-"); |
WriteTextWithBg(x+VALUE_FIELD_W+SIZE+SIZE+10, SIZE / 2 + y -7, 0xD0, text_col, text, sc.work); |
DrawRectangle3D(x-1,y-1,VALUE_FIELD_W+SIZE+SIZE+2,SIZE+2,sc.work_dark,sc.work_light); |
} |
:void more_less_box::redraw() |
/programs/cmm/lib/gui/sensor.h |
---|
23,8 → 23,8 |
:void sensor::draw_wrapper() |
{ |
DrawRectangle(x-1, y-1, w+1, h+1, system.color.work_graph); |
DrawRectangle3D(x-2, y-2, w+3, h+3, system.color.work_dark, system.color.work_light); |
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); |
} |
:void sensor::draw_progress(dword progress_w, active_value, bg_value, mesure) |
34,7 → 34,7 |
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, system.color.work_graph, 200)); |
DrawBar(x, y+h-1, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, sc.work_graph, 200)); |
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); |
/programs/cmm/lib/gui/tabs.h |
---|
13,8 → 13,8 |
:void _tabs::draw_wrapper() |
{ |
DrawRectangle(x,y+TAB_HEIGHT,w-1,h-TAB_HEIGHT, system.color.work_graph); |
DrawRectangle(x+1,y+1+TAB_HEIGHT,w-3,h-2-TAB_HEIGHT, system.color.work_light); |
DrawRectangle(x,y+TAB_HEIGHT,w-1,h-TAB_HEIGHT, sc.work_graph); |
DrawRectangle(x+1,y+1+TAB_HEIGHT,w-3,h-2-TAB_HEIGHT, sc.work_light); |
} |
:void _tabs::draw_button(dword xx, but_id, text) |
25,12 → 25,12 |
if (but_id==active_tab) |
{ |
col_bg=0xE44C9C; |
col_text=system.color.work_text; |
col_text=sc.work_text; |
} |
else |
{ |
col_bg=0xC3A1B7; |
col_text= MixColors(system.color.work, system.color.work_text, 120); |
col_text= MixColors(sc.work, sc.work_text, 120); |
} |
DefineHiddenButton(xx-2,y, ww-1+4,hh-1, but_id); |
WriteText(xx, y+6, 0x90, col_text, text); |