Rev 7450 | Rev 7521 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7450 | Rev 7506 | ||
---|---|---|---|
Line 109... | Line 109... | ||
109 | #include "history.h" |
109 | #include "history.h" |
110 | #include "show_src.h" |
110 | #include "show_src.h" |
111 | #include "download_manager.h" |
111 | #include "download_manager.h" |
Line 112... | Line 112... | ||
112 | 112 | ||
113 | char editURL[sizeof(URL)]; |
- | |
114 | int mouse_twb; |
113 | char editURL[sizeof(URL)]; |
Line 115... | Line 114... | ||
115 | edit_box address_box = {250,60,30,0xffffff,0x94AECE,0xffffff,0xffffff,0x10000000,sizeof(URL),#editURL,#mouse_twb,2,19,19}; |
114 | edit_box address_box = {250,60,30,0xffffff,0x94AECE,0xffffff,0xffffff,0x10000000,sizeof(URL)-2,#editURL,0,2,19,19}; |
Line 116... | Line 115... | ||
116 | 115 | ||
117 | #define SKIN_Y 24 |
116 | #define SKIN_Y 24 |
Line 156... | Line 155... | ||
156 | ProcessEvent(GetButtonID()); |
155 | ProcessEvent(GetButtonID()); |
157 | break; |
156 | break; |
Line 158... | Line 157... | ||
158 | 157 | ||
159 | case evKey: |
158 | case evKey: |
160 | GetKeys(); |
159 | GetKeys(); |
161 | if (address_box.flags & 0b10) |
160 | if (address_box.flags & ed_focus) |
162 | { |
161 | { |
163 | if (key_ascii == ASCII_KEY_ENTER) ProcessEvent(key_scancode); else { |
162 | if (key_ascii == ASCII_KEY_ENTER) ProcessEvent(key_scancode); else { |
164 | EAX = key_editbox; |
163 | EAX = key_editbox; |
165 | edit_box_key stdcall(#address_box); |
164 | edit_box_key stdcall(#address_box); |
Line 306... | Line 305... | ||
306 | strlcpy(#URL,"http://",7); |
305 | strlcpy(#URL,"http://",7); |
307 | strcat(#URL, #editURL); |
306 | strcat(#URL, #editURL); |
308 | } |
307 | } |
309 | OpenPage(); |
308 | OpenPage(); |
310 | return; |
309 | return; |
311 | case SCAN_CODE_F5: |
- | |
312 | IF(address_box.flags & 0b10) return; |
- | |
313 | case REFRESH_BUTTON: |
310 | case REFRESH_BUTTON: |
314 | if (http.transfer > 0) |
311 | if (http.transfer > 0) |
315 | { |
312 | { |
316 | StopLoading(); |
313 | StopLoading(); |
317 | Draw_Window(); |
314 | Draw_Window(); |
Line 452... | Line 449... | ||
452 | DrawEditBoxWebView() |
449 | DrawEditBoxWebView() |
453 | { |
450 | { |
454 | int skin_x_offset; |
451 | int skin_x_offset; |
455 | DrawBar(address_box.left-2, address_box.top-2, address_box.width+3, 2, address_box.color); |
452 | DrawBar(address_box.left-2, address_box.top-2, address_box.width+3, 2, address_box.color); |
456 | DrawBar(address_box.left-2, address_box.top, 2, 22, address_box.color); |
453 | DrawBar(address_box.left-2, address_box.top, 2, 22, address_box.color); |
457 | address_box.size = address_box.pos = address_box.shift = address_box.shift_old = strlen(#editURL); |
454 | //address_box.size = address_box.pos = address_box.shift = address_box.shift_old = strlen(#editURL); |
458 | address_box.offset = 0; |
455 | //address_box.offset = 0; |
- | 456 | EditBox_UpdateText(#address_box, address_box.flags); |
|
459 | edit_box_draw stdcall(#address_box); |
457 | edit_box_draw stdcall(#address_box); |
460 | if (http.transfer > 0) skin_x_offset = 68; else skin_x_offset = 51; |
458 | if (http.transfer > 0) skin_x_offset = 68; else skin_x_offset = 51; |
461 | img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, skin_x_offset, SKIN_Y); |
459 | img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, skin_x_offset, SKIN_Y); |
462 | } |
460 | } |