Rev 8949 | Rev 8952 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8949 | Rev 8951 | ||
---|---|---|---|
Line 55... | Line 55... | ||
55 | ESBYTE[dev_icon]=5; |
55 | ESBYTE[dev_icon]=5; |
56 | strcpy(disc_name, T_UNC); |
56 | strcpy(disc_name, T_UNC); |
57 | } |
57 | } |
58 | 58 | ||
Line 59... | Line -... | ||
59 | #define DEV_H 17 |
- | |
60 | #define DDW 120 |
- | |
61 | #define KFM2_DEVH 20 |
- | |
62 | - | ||
63 | void _SystemDiscs::Draw() |
59 | void _SystemDiscs::Draw() |
64 | { |
60 | { |
65 | char dev_name[15], disc_name[100], i, dev_icon; |
61 | char dev_name[15], disc_name[100], i, dev_icon; |
66 | bool is_active=0; |
62 | bool is_active=0; |
67 | int draw_y, draw_x; |
63 | int draw_y, draw_x; |
Line 68... | Line -... | ||
68 | - | ||
69 | for (i=0; i<30; i++) DeleteButton(100+i); |
- | |
70 | 64 | ||
71 | if (efm) { |
65 | if (efm) { |
72 | DrawSelect(Form.cwidth/2-DDW, KFM_DEV_DROPDOWN_1, location[0]); |
66 | DrawSelect(Form.cwidth/2-DDW, KFM_DEV_DROPDOWN_1, location[0]); |
73 | DrawSelect(Form.cwidth-DDW-2, KFM_DEV_DROPDOWN_2, location[sizeof(dword)]); |
67 | DrawSelect(Form.cwidth-DDW-2, KFM_DEV_DROPDOWN_2, location[sizeof(dword)]); |
74 | files.y = 40 + 17; |
68 | files.y = 40 + 17; |
- | 69 | } else { |
|
- | 70 | Tip(56, T_DEVICES, 55, "="); |
|
- | 71 | for (i=0; i<30; i++) DeleteButton(100+i); |
|
75 | } else { |
72 | |
76 | draw_y = 74; |
73 | draw_y = 74; |
77 | draw_x = 17; |
74 | draw_x = 17; |
78 | for (i=0;i |
75 | for (i=0;i |
79 | strcpy(#dev_name, list.get(i)); |
76 | strcpy(#dev_name, list.get(i)); |
Line 98... | Line 95... | ||
98 | _PutImage(draw_x+6,draw_y, 18,17, is_active*7+dev_icon*17*18*3+#devices); |
95 | _PutImage(draw_x+6,draw_y, 18,17, is_active*7+dev_icon*17*18*3+#devices); |
99 | draw_y += DEV_H; |
96 | draw_y += DEV_H; |
100 | } |
97 | } |
101 | DrawBar(draw_x+6, draw_y, 18, 1, 0xFFFfff); |
98 | DrawBar(draw_x+6, draw_y, 18, 1, 0xFFFfff); |
102 | } |
99 | ActionsDraw(SystemDiscs.list.count*DEV_H+108); |
- | 100 | DrawLeftPanelBg(SystemDiscs.list.count*DEV_H); |
|
- | 101 | } |
|
103 | } |
102 | } |
104 | 103 | ||
Line 105... | Line 104... | ||
105 | void _SystemDiscs::DrawSelect(int draw_x, btid, dword _path) |
104 | void _SystemDiscs::DrawSelect(int draw_x, btid, dword _path) |
106 | { |
105 | { |
Line 156... | Line 155... | ||
156 | files.KeyHome(); |
155 | files.KeyHome(); |
157 | Open_Dir(path,WITH_REDRAW); |
156 | Open_Dir(path,WITH_REDRAW); |
158 | } |
157 | }30;>30;> |
159 | 158 | ||
Line 160... | Line -... | ||
160 | - | ||
161 | - | ||
162 | void DrawDeviceAndActionsLeftPanel() |
- | |
163 | { |
- | |
164 | Tip(56, T_DEVICES, 55, "="); |
- | |
165 | SystemDiscs.Draw(); |
- | |
166 | ActionsDraw(); |
- | |
167 | DrawLeftPanelBg(); |
- | |
168 | } |
- | |
169 | - | ||
170 | dword col_palette_inner[14] = {0xD2D3D3,0xD4D4D4,0xD6D5D6,0xD8D7D8,0xDAD8D9,0xDCDADB, |
- | |
171 | 0xDFDCDD,0xE1DDDE,0xE2DEE0,0xE4DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1}; |
- | |
172 | void DrawFilledBarInner(dword x, y, w, h) |
- | |
173 | { |
- | |
174 | int i, fill_h; |
- | |
175 | if (h <= 14) fill_h = h; else fill_h = 14; |
- | |
176 | for (i=0; i |
- | |
177 | DrawBar(x, y+i, w, h-fill_h, col_palette_inner[14-i]); |
- | |
178 | } |
- | |
179 | - | ||
180 | void Tip(int y, dword caption, id, arrow) |
- | |
181 | { |
- | |
182 | if (col.def) { |
- | |
183 | DrawBar(17,y,160,1,0xEFEDEE); |
- | |
184 | DrawFilledBarInner(17, y+1, 160, 16); |
- | |
185 | DrawBar(17,y+17,160,1,0x7E87A3); |
- | |
186 | } else { |
- | |
187 | DrawBar(17,y,160,1,sc.work_graph); |
- | |
188 | DrawBar(17,y+1,160,16,col.list_bg); |
- | |
189 | DrawBar(17,y+17,160,1,sc.work_graph); |
- | |
190 | } |
- | |
191 | WriteText(25,y+5,0x80,col.list_gb_text,caption); |
- | |
192 | if (id) DefineButton(159,y+1,16,16,id+BT_HIDE+BT_NOFRAME,0); //arrow button |
- | |
193 | WriteText(165,y+5,0x80,col.list_gb_text,arrow); //arrow |
- | |
194 | } |
- | |
195 | - | ||
196 | void ActionsDraw() |
- | |
197 | { |
- | |
198 | int i; |
- | |
199 | int actions_y= SystemDiscs.list.count*DEV_H+108; |
- | |
200 | Tip(actions_y-18, T_ACTIONS, 77, ""); |
- | |
201 | for (i=0; actions[i*3]!=0; i++, actions_y+=DEV_H) |
- | |
202 | { |
- | |
203 | DrawBar(17,actions_y,160,DEV_H,0xFFFFFF); //áåëîå |
- | |
204 | DefineButton(17,actions_y,159,DEV_H,actions[i*3]+BT_HIDE,0xE4DFE1); |
- | |
205 | WriteText(45,actions_y+4,0x80,0,actions[i*3+1]); |
- | |
206 | WriteText(-strlen(actions[i*3+2])*6+170,actions_y+4,0x80,0x999999,actions[i*3+2]); |
- | |
207 | _PutImage(23,actions_y+2, 14,13, i*14*13*3+#factions); |
- | |
208 | } |
- | |
209 | } |
- | |
210 | - | ||
211 | void DrawLeftPanelBg() |
- | |
212 | { |
- | |
213 | int actions_y = SystemDiscs.list.count*DEV_H; |
- | |
214 | int start_y = actions_y+159; |
- | |
215 | int area_h; |
- | |
216 | DrawBar(2,41,190,15,waves_pal[0]); //above devices block |
- | |
217 | DrawBar(17,actions_y+75,160,15,EDX); //below devices block |
- | |
218 | DrawBar(2,56,15,actions_y+103,EDX); //on the left |
- | |
219 | DrawBar(177,56,15,actions_y+103,EDX); //on the right |
- | |
220 | area_h = Form.cheight-start_y-2 - status_bar_h; |
- | |
221 | if (area_h < 268){ |
- | |
222 | PutPaletteImage(#blue_hl, 190, area_h, 2, start_y, 8, #waves_pal); |
- | |
223 | } else { |
- | |
224 | DrawBar(2,start_y,190, area_h-268, waves_pal[0]); |
- | |
225 | PutPaletteImage(#blue_hl, 190, 268, 2, Form.cheight-270-status_bar_h, 8, #waves_pal); |
- | |
226 | } |
- | |
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); |
- | |
230 | PutShadow(18,start_y+1,158,1,1,1); |
- | |
231 | }>=>30;>30;> |
- | |
232 | 159 |