Rev 5674 | Rev 5703 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5674 | Rev 5698 | ||
---|---|---|---|
Line 110... | Line 110... | ||
110 | 110 | ||
111 | 111 | ||
112 | void DrawSystemDiscs() |
112 | void DrawSystemDiscs() |
113 | { |
113 | { |
Line 114... | Line 114... | ||
114 | char dev_name[15], disc_name[100], i, dev_icon, is_active; |
114 | char dev_name[15], disc_name[100], i, dev_icon, is_active; |
115 | int pos_y; |
115 | int pos_y, pos_x; |
116 | 116 | ||
117 | for (i=disc_num; i<30; i++) DeleteButton(100+i); |
- | |
118 | for (i=0;i |
- | |
119 | { |
- | |
120 | pos_y = i*16+74; |
- | |
121 | DrawBar(17,pos_y,6,17,0xFFFFFF); |
117 | for (i=disc_num; i<30; i++) DeleteButton(100+i); |
122 | DrawBar(17+6+18,pos_y,160-6-18,17,0xFFFFFF); |
118 | for (i=0;i |
123 | DefineButton(17,pos_y,159,16,100+i+BT_HIDE,0xFFFFFF); |
119 | { |
124 | strcpy(#dev_name, #disk_list[i].Item); |
120 | strcpy(#dev_name, #disk_list[i].Item); |
125 | dev_name[strlen(#dev_name)-1]=NULL; |
121 | dev_name[strlen(#dev_name)-1]=NULL; |
Line 157... | Line 153... | ||
157 | case 't': |
153 | case 't': |
158 | dev_icon=4; |
154 | dev_icon=4; |
159 | strcpy(#disc_name, T_RAM); |
155 | strcpy(#disc_name, T_RAM); |
160 | break; |
156 | break; |
161 | default: |
157 | default: |
162 | dev_icon=3; //ïî-óìîë÷àíèþ óñòðîéñòâî âûãëÿäèò êàê æåñòÿê íî ýòî íåïðàâèëüíî |
158 | dev_icon=3; |
163 | strcpy(#disc_name, T_UNC); |
159 | strcpy(#disc_name, T_UNC); |
164 | } |
160 | } |
165 | if (strstr(#path, #dev_name)) is_active=true; else is_active=false; |
161 | if (strstr(#path, #dev_name)) is_active=true; else is_active=false; |
- | 162 | if (!two_panels) |
|
- | 163 | { |
|
- | 164 | pos_y = i*16+74; |
|
- | 165 | DrawBar(17,pos_y,6,17,0xFFFFFF); |
|
- | 166 | DrawBar(17+6+18,pos_y,160-6-18,17,0xFFFFFF); |
|
- | 167 | DefineButton(17,pos_y,159,16,100+i+BT_HIDE,0xFFFFFF); |
|
166 | if (show_dev_name) |
168 | if (show_dev_name) |
167 | { |
169 | { |
168 | strcat(#disc_name, #dev_name); |
170 | strcat(#disc_name, #dev_name); |
169 | if (is_active) WriteText(46+1,pos_y+5,0x80,0x555555,#disc_name); |
171 | if (is_active) WriteText(46+1,pos_y+5,0x80,0x555555,#disc_name); |
170 | WriteText(46,pos_y+5,0x80,0,#disc_name); |
172 | WriteText(46,pos_y+5,0x80,0,#disc_name); |
Line 174... | Line 176... | ||
174 | if (is_active) WriteText(46+1,pos_y+5,0x80,0x555555,#dev_name); |
176 | if (is_active) WriteText(46+1,pos_y+5,0x80,0x555555,#dev_name); |
175 | WriteText(46,pos_y+5,0x80,0,#dev_name); |
177 | WriteText(46,pos_y+5,0x80,0,#dev_name); |
176 | } |
178 | } |
177 | _PutImage(23,pos_y, 18,17, is_active*6+dev_icon*17*18*3+#devices); |
179 | _PutImage(23,pos_y, 18,17, is_active*6+dev_icon*17*18*3+#devices); |
178 | } |
180 | } |
- | 181 | else |
|
- | 182 | { |
|
- | 183 | pos_y = 41; |
|
- | 184 | pos_x = i*80 + files.x; |
|
- | 185 | DrawBar(pos_x, pos_y, 80, 17, 0xFFFFFF); |
|
- | 186 | DefineButton(pos_x, pos_y, 79, 16, 100+i+BT_HIDE,0xFFFFFF); |
|
- | 187 | _PutImage(pos_x + 5, pos_y, 18,17, is_active*6+dev_icon*17*18*3+#devices); |
|
- | 188 | WriteText(pos_x + 24, pos_y+5, 0x80, 0, #dev_name); |
|
- | 189 | } |
|
179 | } |
190 | } |
- | 191 | if (two_panels) DrawBar(pos_x + 80, pos_y, files.x + files.w - pos_x - 80 + 17, 17, system.color.work); |
|
- | 192 | } |
|
- | 193 | ||
Line 180... | Line 194... | ||
180 | 194 | ||
181 | void ActionsDraw() |
195 | void ActionsDraw() |
182 | { |
196 | { |
183 | int actions_y=disc_num*16+108, lineh=16; |
197 | int actions_y=disc_num*16+108, lineh=16; |
Line 220... | Line 234... | ||
220 | Tip(56, T_DEVICES, 55, "="); |
234 | Tip(56, T_DEVICES, 55, "="); |
221 | DrawSystemDiscs(); |
235 | DrawSystemDiscs(); |
222 | ActionsDraw(); |
236 | ActionsDraw(); |
223 | DrawLeftPanelBg(); |
237 | DrawLeftPanelBg(); |
224 | }> |
238 | } |
- | 239 | ||
- | 240 | ||
- | 241 | void ClickOnDisk(char diskN) |
|
- | 242 | { |
|
- | 243 | strcpy(#path, #disk_list[diskN].Item); |
|
- | 244 | files.KeyHome(); |
|
- | 245 | Open_Dir(#path,WITH_REDRAW); |
|
- | 246 | }> |
|
225 | >30;>=0)> |
247 | >30;>=0)> |