CMM: minor fixes

git-svn-id: svn://kolibrios.org@5542 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2015-03-20 23:40:49 +00:00
parent 837cdbf430
commit cabc9ee63e
4 changed files with 35 additions and 9 deletions

View File

@ -91,8 +91,8 @@ void DrawSettingsCheckBoxes()
CheckBox2(10, 11, 20, SHOW_DEVICE_CLASS, show_dev_name); CheckBox2(10, 11, 20, SHOW_DEVICE_CLASS, show_dev_name);
CheckBox2(10, 33, 21, SHOW_REAL_NAMES, real_files_names_case); CheckBox2(10, 33, 21, SHOW_REAL_NAMES, real_files_names_case);
CheckBox2(10, 55, 22, NOTIFY_COPY_END, info_after_copy); CheckBox2(10, 55, 22, NOTIFY_COPY_END, info_after_copy);
CheckBox2(10, 77, 23, USE_BIG_FONTS, use_big_fonts); CheckBox2(10, 77, 23, USE_BIG_FONTS, use_big_fonts);
MoreLessBox(10, 104, 18, 25, 26, sc.work_graph, 0xD2D3D3, 0x000000, files.line_h, LIST_LINE_HEIGHT); MoreLessBox(10, 104, 18, 25, 26, #sc, files.line_h, LIST_LINE_HEIGHT);
} }
@ -149,6 +149,7 @@ void SetAppColors()
sc.work = 0xE4DFE1; sc.work = 0xE4DFE1;
sc.work_text = 0; sc.work_text = 0;
sc.work_graph = 0x9098B0; //A0A0B8; //0x819FC5; sc.work_graph = 0x9098B0; //A0A0B8; //0x819FC5;
sc.work_button = 0xD2D3D3;
sc.work_button_text = 0x000000; sc.work_button_text = 0x000000;
col_padding = 0xC8C9C9; col_padding = 0xC8C9C9;
//col_selec = 0x94AECE; //col_selec = 0x94AECE;

View File

@ -156,7 +156,25 @@
$mov eax,70 $mov eax,70
$mov ebx,#write_file_70.func $mov ebx,#write_file_70.func
$int 0x40 $int 0x40
} }
//////////////////////////////////////////
// WriteInFileThatAlredyExists //
//////////////////////////////////////////
:f70 write_file_offset_70;
:int WriteFileWithOffset(dword write_data_size, write_buffer, write_file_path, offset)
{
write_file_offset_70.func = 3;
write_file_offset_70.param1 = offset;
write_file_offset_70.param2 = 0;
write_file_offset_70.param3 = write_data_size;
write_file_offset_70.param4 = write_buffer;
write_file_offset_70.rezerv = 0;
write_file_offset_70.name = write_file_path;
$mov eax,70
$mov ebx,#write_file_offset_70.func
$int 0x40
}
/////////////////////////// ///////////////////////////
// Прочитать папку // // Прочитать папку //

View File

@ -65,17 +65,24 @@
} }
} }
:void MoreLessBox(dword x,y,s, bt_id_more, bt_id_less, color_border, color_button, color_text, value, text) :void MoreLessBox(dword x,y,s, bt_id_more, bt_id_less, colors_pointer, value, text)
{ {
#define VALUE_FIELD_W 26; #define VALUE_FIELD_W 26;
DrawRectangle(x, y, VALUE_FIELD_W, s, color_border); system_colors colors;
ESI = colors_pointer;
colors.work_graph = ESI.system_colors.work_graph;
colors.work_text = ESI.system_colors.work_text;
colors.work_button = ESI.system_colors.work_button;
colors.work_button_text = ESI.system_colors.work_button_text;
DrawRectangle(x, y, VALUE_FIELD_W, s, colors.work_graph);
DrawRectangle3D(x+1, y+1, VALUE_FIELD_W-2, s-2, 0xDDDddd, 0xffffff); DrawRectangle3D(x+1, y+1, VALUE_FIELD_W-2, s-2, 0xDDDddd, 0xffffff);
DrawBar(x+2, y+2, VALUE_FIELD_W-3, s-3, 0xffffff); DrawBar(x+2, y+2, VALUE_FIELD_W-3, s-3, 0xffffff);
WriteText(x+6, s / 2 + y -3, 0x80, 0x000000, itoa(value)); WriteText(x+6, s / 2 + y -3, 0x80, 0x000000, itoa(value));
DrawCaptButton(VALUE_FIELD_W + x + 1, y, s, s, bt_id_more, color_button, color_text, "+"); DrawCaptButton(VALUE_FIELD_W + x + 1, y, s, s, bt_id_more, colors.work_button, colors.work_button_text, "+");
DrawCaptButton(VALUE_FIELD_W + x + s + 2, y, s, s, bt_id_less, color_button, color_text, "-"); DrawCaptButton(VALUE_FIELD_W + x + s + 2, y, s, s, bt_id_less, colors.work_button, colors.work_button_text, "-");
WriteText(x+VALUE_FIELD_W+s+s+10, s / 2 + y -3, 0x80, color_text, text); WriteText(x+VALUE_FIELD_W+s+s+10, s / 2 + y -3, 0x80, colors.work_text, text);
} }
:void DrawProgressBar(dword st_x, st_y, st_w, st_h, col_fon, col_border, col_fill, col_text, progress_percent) :void DrawProgressBar(dword st_x, st_y, st_w, st_h, col_fon, col_border, col_fill, col_text, progress_percent)

View File

@ -271,7 +271,7 @@ void PanelCfg_CheckBox(dword x, y, id, text, byte value) {
} }
void PanelCfg_MoreLessBox(dword x, y, id_more, id_less; byte value; dword text) { void PanelCfg_MoreLessBox(dword x, y, id_more, id_less; byte value; dword text) {
MoreLessBox(x, y, 18, id_more, id_less, sc.work_graph, sc.work_button, sc.work_text, value, text); MoreLessBox(x, y, 18, id_more, id_less, #sc, value, text);
} }