Rev 6674 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6674 | Rev 6678 | ||
---|---|---|---|
Line 19... | Line 19... | ||
19 | 19 | ||
20 | proc_info DL_Form; |
20 | proc_info DL_Form; |
21 | char downloader_edit[10000]; |
21 | char downloader_edit[10000]; |
22 | char filepath[4096]; |
22 | char filepath[4096]; |
23 | int mouse_twbi; |
23 | int mouse_twbi; |
24 | edit_box ed = {250,20,20,0xffffff,0x94AECE,0xffffff,0xffffff,0,sizeof(downloader_edit),#downloader_edit,#mouse_twbi,2,19,19}; |
24 | edit_box ed = {250,20,20,0xffffff,0x94AECE,0xffffff,0xffffff,0x10000000,sizeof(downloader_edit),#downloader_edit,#mouse_twbi,2,19,19}; |
Line 25... | Line 25... | ||
25 | progress_bar pb = {0, 170, 51, 225, 12, 0, 0, 100, 0xFFFfff, 0x74DA00, 0x9F9F9F}; |
25 | progress_bar pb = {0, 170, 51, 225, 12, 0, 0, 100, 0xFFFfff, 0x74DA00, 0x9F9F9F}; |
26 | 26 | ||
27 | byte downloader_opened; |
27 | byte downloader_opened; |
Line 63... | Line 63... | ||
63 | if (key_scancode==SCAN_CODE_ENTER) Key_Scan(301); |
63 | if (key_scancode==SCAN_CODE_ENTER) Key_Scan(301); |
64 | break; |
64 | break; |
Line 65... | Line 65... | ||
65 | 65 | ||
66 | case evReDraw: |
66 | case evReDraw: |
67 | system.color.get(); |
67 | system.color.get(); |
68 | DefineAndDrawWindow(215, 100, 420, 120, 0x74, system.color.work, DL_WINDOW_HEADER, 0); |
68 | DefineAndDrawWindow(215, 100, 580, 120, 0x74, system.color.work, DL_WINDOW_HEADER, 0); |
69 | GetProcessInfo(#DL_Form, SelfInfo); |
69 | GetProcessInfo(#DL_Form, SelfInfo); |
70 | if (DL_Form.status_window>2) break; |
70 | if (DL_Form.status_window>2) break; |
71 | if (DL_Form.height<120) MoveSize(OLD,OLD,OLD,120); |
71 | if (DL_Form.height<120) MoveSize(OLD,OLD,OLD,120); |
72 | if (DL_Form.width<280) MoveSize(OLD,OLD,280,OLD); |
72 | if (DL_Form.width<280) MoveSize(OLD,OLD,280,OLD); |
Line 119... | Line 119... | ||
119 | if (id==306) RunProgram("@open", #filepath); |
119 | if (id==306) RunProgram("@open", #filepath); |
120 | } |
120 | } |
Line 121... | Line 121... | ||
121 | 121 | ||
122 | void DL_Draw_Window() |
122 | void DL_Draw_Window() |
123 | { |
123 | { |
- | 124 | int cleft = 15; |
|
124 | byte cleft = 15; |
125 | int but_x; |
125 | DrawBar(0,0, DL_Form.cwidth, DL_Form.cheight, system.color.work); |
126 | DrawBar(0,0, DL_Form.cwidth, DL_Form.cheight, system.color.work); |
126 | DeleteButton(305); |
127 | DeleteButton(305); |
127 | DeleteButton(306); |
128 | DeleteButton(306); |
128 | if (downloader.state == STATE_NOT_STARTED) || (downloader.state == STATE_COMPLETED) |
129 | if (downloader.state == STATE_NOT_STARTED) || (downloader.state == STATE_COMPLETED) |
129 | { |
130 | { |
130 | DrawCaptButton(cleft, 50, 140, 27, 301, system.color.work_button, system.color.work_button_text, START_DOWNLOADING); |
131 | but_x = cleft + DrawStandartCaptButton(cleft, 55, 301, START_DOWNLOADING); |
131 | } |
132 | } |
132 | if (downloader.state == STATE_IN_PROGRESS) |
133 | if (downloader.state == STATE_IN_PROGRESS) |
133 | { |
134 | { |
134 | DrawCaptButton(cleft, 50, 140, 27, 302, system.color.work_button, system.color.work_button_text, STOP_DOWNLOADING); |
135 | DrawStandartCaptButton(cleft, 55, 302, STOP_DOWNLOADING); |
135 | DrawDownloading(); |
136 | DrawDownloading(); |
136 | } |
137 | } |
137 | if (downloader.state == STATE_COMPLETED) |
138 | if (filepath[0]) |
138 | { |
139 | { |
139 | DrawCaptButton(cleft+140, 50, 110, 27, 305, system.color.work_button, system.color.work_button_text, SHOW_IN_FOLDER); |
140 | but_x += DrawStandartCaptButton(but_x, 55, 305, SHOW_IN_FOLDER); |
140 | DrawCaptButton(cleft+260, 50, 120, 27, 306, system.color.work_button, system.color.work_button_text, OPEN_FILE_TEXT); |
141 | DrawStandartCaptButton(but_x, 55, 306, OPEN_FILE_TEXT); |
141 | } |
142 | } |
142 | WriteText(cleft, ed.top + 4, 0x80, system.color.work_text, "URL:"); |
143 | WriteText(cleft, ed.top + 4, 0x90, system.color.work_text, "URL:"); |
143 | ed.left = strlen("URL:")*6 + 10 + cleft; |
144 | ed.left = strlen("URL:")*8 + 10 + cleft; |
144 | ed.width = DL_Form.cwidth - ed.left - cleft - 3; |
145 | ed.width = DL_Form.cwidth - ed.left - cleft - 3; |
145 | ed.offset=0; |
146 | ed.offset=0; |
146 | //edit_box_draw stdcall(#ed); |
147 | //edit_box_draw stdcall(#ed); |
147 | DrawEditBox(#ed); |
148 | DrawEditBox(#ed); |