Rev 8946 | Rev 8951 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8946 | Rev 8949 | ||
---|---|---|---|
1 | #ifdef LANG_RUS |
- | |
2 | ?define T_DEVICES "áâனá⢠" |
- | |
3 | ?define T_ACTIONS "¥©á⢨ï" |
- | |
4 | char *actions[] = { |
- | |
5 | 59, "®¢ë© ä ©«", "F9", |
- | |
6 | 57, "®¢ ï ¯ ¯ª ", "F7", |
- | |
7 | 60, " áâனª¨", "F10", |
- | |
8 | 0,0,0 |
- | |
9 | }; |
- | |
10 | ?define T_PROG "à®£à ¬¬ë " |
- | |
11 | ?define T_SYS "¨á⥬ " |
- | |
12 | ?define T_UNC "¥¨§¢¥áâ® " |
- | |
13 | ?define T_CD "CD-ROM " |
- | |
14 | ?define T_FD "¨áª¥â " |
- | |
15 | ?define T_HD "¥á⪨© ¤¨áª " |
- | |
16 | ?define T_SATA "SATA ¤¨áª " |
- | |
17 | ?define T_USB "USB ¤¨áª " |
- | |
18 | ?define T_RAM "RAM ¤¨áª " |
- | |
19 | #else |
- | |
20 | ?define T_DEVICES "Devices" |
- | |
21 | ?define T_ACTIONS "Actions" |
- | |
22 | char *actions[] = { |
- | |
23 | 59, "New file", "F9", |
- | |
24 | 57, "New folder", "F7", |
- | |
25 | 60, "Settings", "F10", |
- | |
26 | 0,0,0 |
- | |
27 | }; |
- | |
28 | ?define T_PROG "Programs " |
- | |
29 | ?define T_SYS "System " |
- | |
30 | ?define T_UNC "Unknown " |
- | |
31 | ?define T_CD "CD-ROM " |
- | |
32 | ?define T_FD "Floppy disk " |
- | |
33 | ?define T_HD "Hard disk " |
- | |
34 | ?define T_SATA "SATA disk " |
- | |
35 | ?define T_USB "USB disk " |
- | |
36 | ?define T_RAM "RAM disk " |
- | |
37 | #endif |
- | |
38 | - | ||
39 | struct _SystemDiscs |
1 | struct _SystemDiscs |
40 | { |
2 | { |
41 | collection list; |
3 | collection list; |
42 | int dev_num; |
4 | int dev_num; |
43 | void Get(); |
5 | void Get(); |
44 | void Draw(); |
6 | void Draw(); |
45 | void DrawSelect(); |
7 | void DrawSelect(); |
46 | void DrawOptions(); |
8 | void DrawOptions(); |
47 | void Click(); |
9 | void Click(); |
48 | } SystemDiscs=0; |
10 | } SystemDiscs=0; |
49 | 11 | ||
50 | #define DEV_H 17 |
- | |
51 | #define DEV_H_HOR 20 |
- | |
52 | - | ||
53 | void GetDiskIconAndName(char disk_first_letter, dword dev_icon, disc_name) |
- | |
54 | { |
- | |
55 | switch(disk_first_letter) |
- | |
56 | { |
- | |
57 | case 'r': |
- | |
58 | ESBYTE[dev_icon]=0; |
- | |
59 | strcpy(disc_name, T_SYS); |
- | |
60 | break; |
- | |
61 | case 'k': |
- | |
62 | ESBYTE[dev_icon]=1; |
- | |
63 | strcpy(disc_name, T_PROG); |
- | |
64 | break; |
- | |
65 | case 'f': |
- | |
66 | ESBYTE[dev_icon]=2; |
- | |
67 | strcpy(disc_name, T_FD); |
- | |
68 | break; |
- | |
69 | case 'c': |
- | |
70 | ESBYTE[dev_icon]=3; |
- | |
71 | strcpy(disc_name, T_CD); |
- | |
72 | break; |
- | |
73 | case 'h': |
- | |
74 | case 'b': |
- | |
75 | ESBYTE[dev_icon]=4; |
- | |
76 | strcpy(disc_name, T_HD); |
- | |
77 | break; |
- | |
78 | case 's': |
- | |
79 | ESBYTE[dev_icon]=4; |
- | |
80 | strcpy(disc_name, T_SATA); |
- | |
81 | break; |
- | |
82 | case 't': |
- | |
83 | ESBYTE[dev_icon]=5; |
- | |
84 | strcpy(disc_name, T_RAM); |
- | |
85 | break; |
- | |
86 | case 'u': |
- | |
87 | ESBYTE[dev_icon]=6; |
- | |
88 | strcpy(disc_name, T_USB); |
- | |
89 | break; |
- | |
90 | default: |
- | |
91 | ESBYTE[dev_icon]=5; |
- | |
92 | } |
- | |
93 | } |
- | |
94 | - | ||
95 | void _SystemDiscs::Get() |
12 | void _SystemDiscs::Get() |
96 | { |
13 | { |
97 | bool kolibrios_exists=false; |
14 | bool kolibrios_exists=false; |
98 | char dev_name[10], sys_discs[10]; |
15 | char dev_name[10], sys_discs[10]; |
99 | int i1, j1, dev_num_i, dev_disc_num; |
16 | int i1, j1, dev_num_i, dev_disc_num; |
100 | dword devbuf, diskbuf; |
17 | dword devbuf, diskbuf; |
101 | 18 | ||
102 | list.drop(); |
19 | list.drop(); |
103 | devbuf = malloc(10000); |
20 | devbuf = malloc(10000); |
104 | ReadDir(19, devbuf, "/"); |
21 | ReadDir(19, devbuf, "/"); |
105 | dev_num = dev_num_i = EBX; |
22 | dev_num = dev_num_i = EBX; |
106 | for (i1=0; i1 |
23 | for (i1=0; i1 |
107 | { |
24 | { |
108 | sprintf(#dev_name,"/%s",i1*304+ devbuf+72); |
25 | sprintf(#dev_name,"/%s",i1*304+ devbuf+72); |
109 | GetDir(#diskbuf, #dev_disc_num, #dev_name, DIRS_NOROOT); |
26 | GetDir(#diskbuf, #dev_disc_num, #dev_name, DIRS_NOROOT); |
110 | for (j1=0; j1 |
27 | for (j1=0; j1 |
111 | { |
28 | { |
112 | sprintf(#sys_discs,"%s/%s",#dev_name,j1*304+ diskbuf+72); |
29 | sprintf(#sys_discs,"%s/%s",#dev_name,j1*304+ diskbuf+72); |
113 | if (sys_discs[1]=='c') || (dir_exists(#sys_discs)) list.add(#sys_discs); |
30 | if (sys_discs[1]=='c') || (dir_exists(#sys_discs)) list.add(#sys_discs); |
114 | } |
31 | } |
115 | if (!strcmp(#sys_discs, "/rd/1")) |
32 | if (!strcmp(#sys_discs, "/rd/1")) |
116 | { |
33 | { |
117 | if (dir_exists("/kolibrios")) && (!kolibrios_exists) { |
34 | if (dir_exists("/kolibrios")) && (!kolibrios_exists) { |
118 | kolibrios_exists=true; |
35 | kolibrios_exists=true; |
119 | list.add("/kolibrios"); |
36 | list.add("/kolibrios"); |
120 | dev_num++; |
37 | dev_num++; |
121 | } |
38 | } |
122 | } |
39 | } |
123 | } |
40 | } |
124 | free(devbuf); |
41 | free(devbuf); |
125 | free(diskbuf); |
42 | free(diskbuf); |
126 | } |
43 | } |
127 | 44 | ||
- | 45 | void GetDiskIconAndName(char disk_first_letter, dword dev_icon, dword disc_name) |
|
- | 46 | { |
|
- | 47 | int i; |
|
- | 48 | for (i=0; devinfo[i]!=0; i+=3) { |
|
- | 49 | if (disk_first_letter == ESBYTE[devinfo[i]]) { |
|
- | 50 | ESBYTE[dev_icon] = devinfo[i+1]; |
|
- | 51 | strcpy(disc_name, devinfo[i+2]); |
|
- | 52 | return; |
|
- | 53 | } |
|
- | 54 | } |
|
- | 55 | ESBYTE[dev_icon]=5; |
|
- | 56 | strcpy(disc_name, T_UNC); |
|
- | 57 | } |
|
- | 58 | ||
- | 59 | #define DEV_H 17 |
|
128 | #define DDW 120 |
60 | #define DDW 120 |
- | 61 | #define KFM2_DEVH 20 |
|
129 | 62 | ||
130 | void _SystemDiscs::Draw() |
63 | void _SystemDiscs::Draw() |
131 | { |
64 | { |
132 | char dev_name[15], disc_name[100], i, dev_icon, is_active=0; |
65 | char dev_name[15], disc_name[100], i, dev_icon; |
133 | int draw_y, draw_x; |
66 | bool is_active=0; |
- | 67 | int draw_y, draw_x; |
|
134 | 68 | ||
135 | for (i=0; i<30; i++) DeleteButton(100+i); |
69 | for (i=0; i<30; i++) DeleteButton(100+i); |
136 | 70 | ||
137 | if (efm) { |
71 | if (efm) { |
138 | if (active_panel==0) { |
72 | DrawSelect(Form.cwidth/2-DDW, KFM_DEV_DROPDOWN_1, location[0]); |
139 | DrawSelect(Form.cwidth/2-DDW, 10, #path, KFM_DEV_DROPDOWN_1); |
- | |
140 | DrawSelect(Form.cwidth-DDW-2, 10, #inactive_path, KFM_DEV_DROPDOWN_2); |
73 | DrawSelect(Form.cwidth-DDW-2, KFM_DEV_DROPDOWN_2, location[sizeof(dword)]); |
141 | } else { |
- | |
142 | DrawSelect(Form.cwidth/2-DDW, 10, #inactive_path, KFM_DEV_DROPDOWN_1); |
- | |
143 | DrawSelect(Form.cwidth-DDW-2, 10, #path, KFM_DEV_DROPDOWN_2); |
- | |
144 | } |
74 | files.y = 40 + 17; |
145 | files.y = 40 + 17; |
- | |
146 | } else { |
75 | } else { |
147 | draw_y = 74; |
76 | draw_y = 74; |
148 | draw_x = 17; |
77 | draw_x = 17; |
149 | for (i=0;i |
78 | for (i=0;i |
150 | strcpy(#dev_name, list.get(i)); |
79 | strcpy(#dev_name, list.get(i)); |
151 | GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name); |
80 | GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name); |
152 | if (strstr(#path, #dev_name)==#path) is_active=true; else is_active=false; |
81 | if (strstr(path, #dev_name)==path) is_active=true; else is_active=false; |
153 | 82 | ||
154 | DrawBar(draw_x,draw_y,6,DEV_H+1,0xFFFFFF); |
83 | DrawBar(draw_x,draw_y,6,DEV_H+1,0xFFFFFF); |
155 | DrawBar(draw_x+6+18,draw_y,160-6-18,DEV_H+1,0xFFFFFF); |
84 | DrawBar(draw_x+6+18,draw_y,160-6-18,DEV_H+1,0xFFFFFF); |
156 | DefineButton(draw_x,draw_y,159,16,100+i+BT_HIDE,0xFFFFFF); |
85 | DefineHiddenButton(draw_x,draw_y,159,16,100+i); |
157 | if (show_dev_name.checked) |
86 | if (show_dev_name.checked) |
158 | { |
87 | { |
159 | strcat(#disc_name, #dev_name); |
88 | strcat(#disc_name, #dev_name); |
160 | if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#disc_name); |
89 | if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#disc_name); |
161 | WriteText(draw_x+29,draw_y+5,0x80,0,#disc_name); |
90 | WriteText(draw_x+29,draw_y+5,0x80,0,#disc_name); |
162 | //if (is_active) kfont.bold = true; |
91 | //if (is_active) kfont.bold = true; |
163 | //kfont.WriteIntoWindow(draw_x + 29, draw_y+2, 0xFFFfff, 0x000000, kfont.size.pt, #disc_name); |
92 | //kfont.WriteIntoWindow(draw_x + 29, draw_y+2, 0xFFFfff, 0x000000, kfont.size.pt, #disc_name); |
164 | //kfont.bold = false; |
93 | //kfont.bold = false; |
165 | } else { |
94 | } else { |
166 | if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#dev_name); |
95 | if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#dev_name); |
167 | WriteText(draw_x+29,draw_y+5,0x80,0,#dev_name); |
96 | WriteText(draw_x+29,draw_y+5,0x80,0,#dev_name); |
168 | } |
97 | } |
169 | _PutImage(draw_x+6,draw_y, 18,17, is_active*7+dev_icon*17*18*3+#devices); |
98 | _PutImage(draw_x+6,draw_y, 18,17, is_active*7+dev_icon*17*18*3+#devices); |
170 | draw_y += DEV_H; |
99 | draw_y += DEV_H; |
171 | } |
100 | } |
172 | DrawBar(draw_x+6, draw_y, 18, 1, 0xFFFfff); |
101 | DrawBar(draw_x+6, draw_y, 18, 1, 0xFFFfff); |
173 | } |
102 | } |
174 | } |
103 | } |
175 | 104 | ||
176 | void _SystemDiscs::DrawSelect(int draw_x, draw_y, path1, btid) |
105 | void _SystemDiscs::DrawSelect(int draw_x, btid, dword _path) |
177 | { |
106 | { |
- | 107 | #define SELECTY 10 |
|
178 | char dev_name[15], disc_name[100], i, dev_icon, is_active=0; |
108 | char dev_name[15], disc_name[100], i, dev_icon; |
- | 109 | ||
179 | if (ESBYTE[path1+1]=='\0') { |
110 | if (ESBYTE[_path+1]=='\0') { |
180 | strcpy(#dev_name, "/root"); |
111 | strcpy(#dev_name, "/root"); |
181 | dev_icon = 0; |
112 | dev_icon = 0; |
182 | } else if (chrnum(path1, '/')==1) { |
113 | } else if (chrnum(_path, '/')==1) { |
183 | strcpy(#dev_name, path1); |
114 | strcpy(#dev_name, _path); |
184 | GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name); |
115 | GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name); |
185 | } else for (i=0;i |
116 | } else for (i=0;i |
186 | strcpy(#dev_name, list.get(i)); |
117 | strcpy(#dev_name, list.get(i)); |
187 | GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name); |
118 | GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name); |
188 | if (strstr(path1, #dev_name)-path1==0) break; |
119 | if (strstr(_path, #dev_name)-_path==0) break; |
189 | } |
120 | } |
190 | DrawRectangle(draw_x-1, draw_y-1, DDW+2-DEV_H_HOR, DEV_H_HOR+1, sc.work_graph); |
121 | DrawRectangle(draw_x-1, SELECTY-1, DDW+2-KFM2_DEVH, KFM2_DEVH+1, sc.work_graph); |
191 | DrawBar(draw_x, draw_y, DDW+1-DEV_H_HOR, DEV_H_HOR, 0xFFFFFF); |
122 | DrawBar(draw_x, SELECTY, DDW+1-KFM2_DEVH, KFM2_DEVH, 0xFFFFFF); |
192 | _PutImage(draw_x + 5, draw_y+2, 18,17, is_active*7+dev_icon*17*18*3+#devices); |
123 | _PutImage(draw_x + 5, SELECTY+2, 18,17, dev_icon*17*18*3+#devices); |
193 | kfont.WriteIntoWindow(draw_x + 24, draw_y+2, 0xFFFfff, 0x000000, kfont.size.pt, #dev_name+1); |
124 | kfont.WriteIntoWindow(draw_x + 24, math.max(KFM2_DEVH-kfont.height/2+SELECTY,0), 0xFFFfff, 0x000000, kfont.size.pt, #dev_name+1); |
194 | DefineButton(draw_x, draw_y, DDW-1, DEV_H_HOR-1, btid+1+BT_HIDE,0xFFFFFF); |
125 | DefineHiddenButton(draw_x, SELECTY, DDW-1, KFM2_DEVH-1, btid+1); |
195 | DrawFlatButtonSmall(draw_x+DDW-DEV_H_HOR+1, draw_y-1, DEV_H_HOR-1, DEV_H_HOR+1, btid, "\x19"); |
126 | DrawFlatButtonSmall(draw_x+DDW-KFM2_DEVH+1, SELECTY-1, KFM2_DEVH-1, KFM2_DEVH+1, btid, "\x19"); |
196 | 127 | } |
|
197 | draw_x += DDW + 1; |
- | |
198 | //DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, DEV_H_HOR, sc.work); |
- | |
199 | } |
- | |
200 | 128 | ||
201 | void _SystemDiscs::DrawOptions(int draw_x, draw_y) |
129 | void _SystemDiscs::DrawOptions(int draw_x) |
202 | { |
130 | { |
- | 131 | int optionsy = SELECTY+KFM2_DEVH+1; |
|
203 | char dev_name[15], disc_name[100], i, dev_icon, is_active=0; |
132 | char dev_name[15], disc_name[100], i, dev_icon, is_active=0; |
204 | 133 | ||
205 | for (i=0; i<30; i++) DeleteButton(100+i); |
134 | for (i=0; i<30; i++) DeleteButton(100+i); |
206 | 135 | ||
207 | DrawPopup(draw_x, draw_y, DDW, list.count*DEV_H_HOR, 1, -1, sc.work_graph); |
136 | DrawPopup(draw_x, optionsy, DDW, list.count*KFM2_DEVH, 1, -1, sc.work_graph); |
208 | 137 | ||
209 | for (i=0;i |
138 | for (i=0;i |
210 | strcpy(#dev_name, list.get(i)); |
139 | strcpy(#dev_name, list.get(i)); |
211 | GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name); |
140 | GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name); |
212 | if (strstr(#path, #dev_name)!=0) is_active=true; else is_active=false; |
141 | if (strstr(path, #dev_name)!=0) is_active=true; else is_active=false; |
213 | 142 | ||
214 | DrawBar(draw_x, draw_y, DDW, DEV_H_HOR, 0xFFFFFF); |
143 | DrawBar(draw_x, optionsy, DDW, KFM2_DEVH, 0xFFFFFF); |
215 | DefineButton(draw_x, draw_y, DDW, DEV_H_HOR-1, 100+i+BT_HIDE,0xFFFFFF); |
144 | DefineButton(draw_x, optionsy, DDW, KFM2_DEVH-1, 100+i+BT_HIDE,0xFFFFFF); |
216 | _PutImage(draw_x + 5, draw_y+2, 18,17, is_active*7+dev_icon*17*18*3+#devices); |
145 | _PutImage(draw_x + 5, optionsy+2, 18,17, is_active*7+dev_icon*17*18*3+#devices); |
217 | if (is_active) kfont.bold = true; |
146 | if (is_active) kfont.bold = true; |
218 | kfont.WriteIntoWindow(draw_x + 24, draw_y+2, 0xFFFfff, 0x000000, kfont.size.pt, #dev_name+1); |
147 | kfont.WriteIntoWindow(draw_x + 24, optionsy+2, 0xFFFfff, 0x000000, kfont.size.pt, #dev_name+1); |
219 | kfont.bold = false; |
148 | kfont.bold = false; |
220 | draw_y += DEV_H_HOR; |
149 | optionsy += KFM2_DEVH; |
221 | } |
150 | } |
222 | } |
151 | } |
223 | 152 | ||
224 | void _SystemDiscs::Click(int n) |
153 | void _SystemDiscs::Click(int n) |
225 | { |
154 | { |
226 | strcpy(#path, list.get(n)); |
155 | strcpy(path, list.get(n)); |
227 | files.KeyHome(); |
156 | files.KeyHome(); |
228 | Open_Dir(#path,WITH_REDRAW); |
157 | Open_Dir(path,WITH_REDRAW); |
229 | } |
158 | } |
230 | 159 | ||
231 | 160 | ||
232 | 161 | ||
233 | void DrawDeviceAndActionsLeftPanel() |
162 | void DrawDeviceAndActionsLeftPanel() |
234 | { |
163 | { |
235 | Tip(56, T_DEVICES, 55, "="); |
164 | Tip(56, T_DEVICES, 55, "="); |
236 | SystemDiscs.Draw(); |
165 | SystemDiscs.Draw(); |
237 | ActionsDraw(); |
166 | ActionsDraw(); |
238 | DrawLeftPanelBg(); |
167 | DrawLeftPanelBg(); |
239 | } |
168 | } |
240 | 169 | ||
241 | dword col_palette_inner[14] = {0xD2D3D3,0xD4D4D4,0xD6D5D6,0xD8D7D8,0xDAD8D9,0xDCDADB, |
170 | dword col_palette_inner[14] = {0xD2D3D3,0xD4D4D4,0xD6D5D6,0xD8D7D8,0xDAD8D9,0xDCDADB, |
242 | 0xDFDCDD,0xE1DDDE,0xE2DEE0,0xE4DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1}; |
171 | 0xDFDCDD,0xE1DDDE,0xE2DEE0,0xE4DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1}; |
243 | void DrawFilledBarInner(dword x, y, w, h) |
172 | void DrawFilledBarInner(dword x, y, w, h) |
244 | { |
173 | { |
245 | int i, fill_h; |
174 | int i, fill_h; |
246 | if (h <= 14) fill_h = h; else fill_h = 14; |
175 | if (h <= 14) fill_h = h; else fill_h = 14; |
247 | for (i=0; i |
176 | for (i=0; i |
248 | DrawBar(x, y+i, w, h-fill_h, col_palette_inner[14-i]); |
177 | DrawBar(x, y+i, w, h-fill_h, col_palette_inner[14-i]); |
249 | } |
178 | } |
250 | 179 | ||
251 | void Tip(int y, dword caption, id, arrow) |
180 | void Tip(int y, dword caption, id, arrow) |
252 | { |
181 | { |
253 | if (col.def) { |
182 | if (col.def) { |
254 | DrawBar(17,y,160,1,0xEFEDEE); |
183 | DrawBar(17,y,160,1,0xEFEDEE); |
255 | DrawFilledBarInner(17, y+1, 160, 16); |
184 | DrawFilledBarInner(17, y+1, 160, 16); |
256 | DrawBar(17,y+17,160,1,0x7E87A3); |
185 | DrawBar(17,y+17,160,1,0x7E87A3); |
257 | } else { |
186 | } else { |
258 | DrawBar(17,y,160,1,sc.work_graph); |
187 | DrawBar(17,y,160,1,sc.work_graph); |
259 | DrawBar(17,y+1,160,16,col.list_bg); |
188 | DrawBar(17,y+1,160,16,col.list_bg); |
260 | DrawBar(17,y+17,160,1,sc.work_graph); |
189 | DrawBar(17,y+17,160,1,sc.work_graph); |
261 | } |
190 | } |
262 | WriteText(25,y+5,0x80,col.list_gb_text,caption); |
191 | WriteText(25,y+5,0x80,col.list_gb_text,caption); |
263 | if (id) DefineButton(159,y+1,16,16,id+BT_HIDE+BT_NOFRAME,0); //arrow button |
192 | if (id) DefineButton(159,y+1,16,16,id+BT_HIDE+BT_NOFRAME,0); //arrow button |
264 | WriteText(165,y+5,0x80,col.list_gb_text,arrow); //arrow |
193 | WriteText(165,y+5,0x80,col.list_gb_text,arrow); //arrow |
265 | } |
194 | } |
266 | 195 | ||
267 | void ActionsDraw() |
196 | void ActionsDraw() |
268 | { |
197 | { |
269 | int i; |
198 | int i; |
270 | int actions_y= SystemDiscs.list.count*DEV_H+108; |
199 | int actions_y= SystemDiscs.list.count*DEV_H+108; |
271 | Tip(actions_y-18, T_ACTIONS, 77, ""); |
200 | Tip(actions_y-18, T_ACTIONS, 77, ""); |
272 | for (i=0; actions[i*3]!=0; i++, actions_y+=DEV_H) |
201 | for (i=0; actions[i*3]!=0; i++, actions_y+=DEV_H) |
273 | { |
202 | { |
274 | DrawBar(17,actions_y,160,DEV_H,0xFFFFFF); //áåëîå |
203 | DrawBar(17,actions_y,160,DEV_H,0xFFFFFF); //áåëîå |
275 | DefineButton(17,actions_y,159,DEV_H,actions[i*3]+BT_HIDE,0xE4DFE1); |
204 | DefineButton(17,actions_y,159,DEV_H,actions[i*3]+BT_HIDE,0xE4DFE1); |
276 | WriteText(45,actions_y+4,0x80,0,actions[i*3+1]); |
205 | WriteText(45,actions_y+4,0x80,0,actions[i*3+1]); |
277 | WriteText(-strlen(actions[i*3+2])*6+170,actions_y+4,0x80,0x999999,actions[i*3+2]); |
206 | WriteText(-strlen(actions[i*3+2])*6+170,actions_y+4,0x80,0x999999,actions[i*3+2]); |
278 | _PutImage(23,actions_y+2, 14,13, i*14*13*3+#factions); |
207 | _PutImage(23,actions_y+2, 14,13, i*14*13*3+#factions); |
279 | } |
208 | } |
280 | } |
209 | } |
281 | 210 | ||
282 | void DrawLeftPanelBg() |
211 | void DrawLeftPanelBg() |
283 | { |
212 | { |
284 | int actions_y = SystemDiscs.list.count*DEV_H; |
213 | int actions_y = SystemDiscs.list.count*DEV_H; |
285 | int start_y = actions_y+159; |
214 | int start_y = actions_y+159; |
286 | int area_h; |
215 | int area_h; |
287 | DrawBar(2,41,190,15,waves_pal[0]); //above devices block |
216 | DrawBar(2,41,190,15,waves_pal[0]); //above devices block |
288 | DrawBar(17,actions_y+75,160,15,waves_pal[0]); //below devices block |
217 | DrawBar(17,actions_y+75,160,15,EDX); //below devices block |
289 | PutShadow(17,actions_y+75,160,1,1,3); |
218 | DrawBar(2,56,15,actions_y+103,EDX); //on the left |
290 | PutShadow(18,actions_y+75+1,158,1,1,1); |
- | |
291 | DrawBar(2,56,15,actions_y+103,waves_pal[0]); //on the left |
- | |
292 | DrawBar(177,56,15,actions_y+103,waves_pal[0]); //on the right |
219 | DrawBar(177,56,15,actions_y+103,EDX); //on the right |
293 | area_h = Form.cheight-start_y-2 - status_bar_h; |
220 | area_h = Form.cheight-start_y-2 - status_bar_h; |
294 | if (area_h < 268){ |
221 | if (area_h < 268){ |
295 | PutPaletteImage(#blue_hl, 190, area_h, 2, start_y, 8, #waves_pal); |
222 | PutPaletteImage(#blue_hl, 190, area_h, 2, start_y, 8, #waves_pal); |
296 | } else { |
223 | } else { |
297 | DrawBar(2,start_y,190, area_h-268, waves_pal[0]); |
224 | DrawBar(2,start_y,190, area_h-268, waves_pal[0]); |
298 | PutPaletteImage(#blue_hl, 190, 268, 2, Form.cheight-270-status_bar_h, 8, #waves_pal); |
225 | PutPaletteImage(#blue_hl, 190, 268, 2, Form.cheight-270-status_bar_h, 8, #waves_pal); |
299 | } |
226 | } |
300 | PutShadow(17,start_y,160,1,1,3); |
227 | PutShadow(17,actions_y+75,160,1,1,3); |
- | 228 | PutShadow(18,actions_y+75+1,158,1,1,1); |
|
- | 229 | PutShadow(17,start_y,160,1,1,3); |
|
301 | PutShadow(18,start_y+1,158,1,1,1); |
230 | PutShadow(18,start_y+1,158,1,1,1); |
302 | }>=>30;>30;> |
231 | }>=>30;>30;> |