#ifdef LANG_RUS ?define T_DEVICES "Устройства" ?define T_ACTIONS "Действия" char *actions[] = { 57, "Новый файл", "F7", 56, "Новая папка", "F6", 60, "Настройки", "F10", 0,0,0 }; ?define T_PROG "Программы " ?define T_SYS "Система " ?define T_UNC "Неизвестно " ?define T_CD "CD-ROM " ?define T_FD "Дискета " ?define T_HD "Жесткий диск " ?define T_SATA "SATA диск " ?define T_USB "USB диск " ?define T_RAM "RAM диск " #else ?define T_DEVICES "Devices" ?define T_ACTIONS "Actions" char *actions[] = { 57, "New file", "F7", 56, "New folder", "F6", 60, "Settings", "F10", 0,0,0 }; ?define T_PROG "Programs " ?define T_SYS "System " ?define T_UNC "Unknown " ?define T_CD "CD-ROM " ?define T_FD "Floppy disk " ?define T_HD "Hard disk " ?define T_SATA "SATA disk " ?define T_USB "USB disk " ?define T_RAM "RAM disk " #endif struct _SystemDiscs { collection list; int dev_num; void Get(); void Draw(); void Click(); } SystemDiscs=0; #define DEV_H 17 #define DEV_H_HOR 21 void GetDiskIconAndName(char disk_first_letter, dword dev_icon, disc_name) { switch(disk_first_letter) { case 'r': ESBYTE[dev_icon]=0; strcpy(disc_name, T_SYS); break; case 'k': ESBYTE[dev_icon]=1; strcpy(disc_name, T_PROG); break; case 'f': ESBYTE[dev_icon]=2; strcpy(disc_name, T_FD); break; case 'c': ESBYTE[dev_icon]=3; strcpy(disc_name, T_CD); break; case 'h': case 'b': ESBYTE[dev_icon]=4; strcpy(disc_name, T_HD); break; case 's': ESBYTE[dev_icon]=4; strcpy(disc_name, T_SATA); break; case 't': ESBYTE[dev_icon]=5; strcpy(disc_name, T_RAM); break; case 'u': ESBYTE[dev_icon]=6; strcpy(disc_name, T_USB); break; default: ESBYTE[dev_icon]=5; } } void _SystemDiscs::Get() { bool kolibrios_exists=false; char dev_name[10], sys_discs[10]; int i1, j1, dev_num_i, dev_disc_num; dword devbuf; list.drop(); devbuf = malloc(10000); ReadDir(19, devbuf, "/"); dev_num = dev_num_i = EBX; for (i1=0; i1=Form.cwidth-100) && (Form.cwidth) { DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, DEV_H_HOR, 0xFFFFFF); draw_x = 2; draw_y += DEV_H_HOR; } } else { DrawBar(draw_x,draw_y,6,DEV_H+1,0xFFFFFF); DrawBar(draw_x+6+18,draw_y,160-6-18,DEV_H+1,0xFFFFFF); DefineButton(draw_x,draw_y,159,16,100+i+BT_HIDE,0xFFFFFF); if (show_dev_name.checked) { strcat(#disc_name, #dev_name); if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#disc_name); WriteText(draw_x+29,draw_y+5,0x80,0,#disc_name); } else { if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#dev_name); WriteText(draw_x+29,draw_y+5,0x80,0,#dev_name); } _PutImage(draw_x+6,draw_y, 18,17, is_active*7+dev_icon*17*18*3+#devices); draw_y += DEV_H; } } if (two_panels.checked) { DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, DEV_H_HOR, 0xFFFFFF); files.y = draw_y + DEV_H_HOR + 17; } else { DrawBar(draw_x+6, draw_y, 18, 1, 0xFFFfff); } } void _SystemDiscs::Click(int n) { strcpy(#path, list.get(n)); files.KeyHome(); Open_Dir(#path,WITH_REDRAW); } void DrawDeviceAndActionsLeftPanel() { Tip(56, T_DEVICES, 55, "="); SystemDiscs.Draw(); ActionsDraw(); DrawLeftPanelBg(); } dword col_palette_inner[14] = {0xD2D3D3,0xD4D4D4,0xD6D5D6,0xD8D7D8,0xDAD8D9,0xDCDADB, 0xDFDCDD,0xE1DDDE,0xE2DEE0,0xE4DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1}; void DrawFilledBarInner(dword x, y, w, h) { int i, fill_h; if (h <= 14) fill_h = h; else fill_h = 14; for (i=0; i