diff --git a/programs/cmm/aelia/aelia.c b/programs/cmm/aelia/aelia.c index 6727847315..79622bd990 100644 --- a/programs/cmm/aelia/aelia.c +++ b/programs/cmm/aelia/aelia.c @@ -204,12 +204,12 @@ void HandleKeyEvent() EventOpenAddress(#address); return; case SCAN_CODE_BS: - if (! address_box.flags & 0b10) { + if (! address_box.flags & ed_focus) { EventGoBack(); return; } } - if (list.ProcessKey(key_scancode)) && (! address_box.flags & 0b10) { + if (list.ProcessKey(key_scancode)) && (! address_box.flags & ed_focus) { DrawPage(); return; } diff --git a/programs/cmm/appearance/appearance.c b/programs/cmm/appearance/appearance.c index ab58b19cb0..12bc9b4436 100644 --- a/programs/cmm/appearance/appearance.c +++ b/programs/cmm/appearance/appearance.c @@ -64,11 +64,11 @@ _tabs tabs = { LP, LP, NULL, NULL, SKINS }; checkbox checkbox1 = { "Checkbox", true }; more_less_box spinbox1 = { 23, 0, 999, "SpinBox" }; edit_box edit_cmm = {180,NULL,NULL,0xffffff,0x94AECE,0xFFFfff,0xffffff, - 0x10000000,sizeof(param),#param,0, 0b}; + 0x10000000,sizeof(param)-2,#param,0, 0b}; char st_str[16]; edit_box edit_st = {180,NULL,NULL,0xffffff,0x94AECE,0xFFFfff,0xffffff, - 0x10000000,sizeof(st_str),#st_str,0, 0b}; + 0x10000000,sizeof(st_str)-2,#st_str,0, 0b}; char default_dir[] = "/rd/1"; od_filter filter2 = { 8, "TXT\0\0" }; @@ -130,7 +130,7 @@ void main() } if (key_scancode==SCAN_CODE_DEL) EventDeleteFile(); - if (! edit_cmm.flags & 0b10) && (! edit_st.flags & 0b10) + if (! edit_cmm.flags & ed_focus) && (! edit_st.flags & ed_focus) for (id=select_list.cur_y+1; id 0) { @@ -454,8 +451,9 @@ DrawEditBoxWebView() int skin_x_offset; DrawBar(address_box.left-2, address_box.top-2, address_box.width+3, 2, address_box.color); DrawBar(address_box.left-2, address_box.top, 2, 22, address_box.color); - address_box.size = address_box.pos = address_box.shift = address_box.shift_old = strlen(#editURL); - address_box.offset = 0; + //address_box.size = address_box.pos = address_box.shift = address_box.shift_old = strlen(#editURL); + //address_box.offset = 0; + EditBox_UpdateText(#address_box, address_box.flags); edit_box_draw stdcall(#address_box); if (http.transfer > 0) skin_x_offset = 68; else skin_x_offset = 51; img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, skin_x_offset, SKIN_Y); diff --git a/programs/cmm/browser/download_manager.h b/programs/cmm/browser/download_manager.h index 38eb56a3ab..3125807906 100644 --- a/programs/cmm/browser/download_manager.h +++ b/programs/cmm/browser/download_manager.h @@ -22,7 +22,7 @@ char save_to[4096] = "/tmp0/1/Downloads"; proc_info DL_Form; char downloader_edit[10000]; char filepath[4096]; -edit_box ed = {NULL,57,20,0xffffff,0x94AECE,0xffffff,0xffffff,0x10000000,sizeof(downloader_edit),#downloader_edit,0,2,19,19}; +edit_box ed = {NULL,57,20,0xffffff,0x94AECE,0xffffff,0xffffff,0x10000000,sizeof(downloader_edit)-2,#downloader_edit,0,2,19,19}; progress_bar pb = {0, 20, 58, 350, 17, 0, 0, 100, 0xFFFfff, 0x74DA00, 0x9F9F9F}; //progress_bar pb = {0, 180, 55, 225, 12, 0, 0, 100, 0xFFFfff, 0x74DA00, 0x9F9F9F}; //progress_bar: value, left, top, width, height, style, min, max, back_color, progress_color, frame_color; diff --git a/programs/cmm/diff/diff_gui.h b/programs/cmm/diff/diff_gui.h index bcec4a40d2..82ec404dfc 100644 --- a/programs/cmm/diff/diff_gui.h +++ b/programs/cmm/diff/diff_gui.h @@ -8,8 +8,8 @@ od_filter filter2 = {0,0}; char src_box_text[4096]; char dst_box_text[4096]; -edit_box src_box = {340,20,35,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(src_box_text),#src_box_text,0, 10b}; -edit_box dst_box = {340,20,95,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(dst_box_text),#dst_box_text,0, 0b}; +edit_box src_box = {340,20,35,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(src_box_text)-2,#src_box_text,0, ed_focus}; +edit_box dst_box = {340,20,95,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(dst_box_text)-2,#dst_box_text,0, 0b}; #define BID_EXIT_PRC 01 #define BID_SRC_OPEN 10 @@ -44,16 +44,14 @@ void gui() OpenDialog_start stdcall (#o_dialog); if (o_dialog.status) { strcpy(#src_box_text, #openfile_path); - src_box.size = src_box.pos - = src_box.shift = src_box.shift_old = strlen(#src_box_text); + EditBox_UpdateText(#src_box, #src_box.flags); } break; case BID_DST_OPEN: OpenDialog_start stdcall (#o_dialog); if (o_dialog.status) { strcpy(#dst_box_text, #openfile_path); - dst_box.size = dst_box.pos - = dst_box.shift = dst_box.shift_old = strlen(#dst_box_text); + EditBox_UpdateText(#dst_box, #dst_box.flags); } break; case BID_COMPARE: @@ -67,12 +65,12 @@ void gui() GetKeys(); if (key_scancode == SCAN_CODE_ESC) ExitProcess(); if (key_scancode == SCAN_CODE_TAB) { - if ( src_box.flags & 10b ) { - src_box.flags -= 10b; - dst_box.flags += 10b; + if ( src_box.flags & ed_focus ) { + src_box.flags -= ed_focus; + dst_box.flags += ed_focus; } else { - src_box.flags += 10b; - dst_box.flags -= 10b; + src_box.flags += ed_focus; + dst_box.flags -= ed_focus; } edit_box_draw stdcall (#src_box); edit_box_draw stdcall (#dst_box); diff --git a/programs/cmm/easyshot/easyshot.c b/programs/cmm/easyshot/easyshot.c index 6e7d511ae2..53a9016e79 100644 --- a/programs/cmm/easyshot/easyshot.c +++ b/programs/cmm/easyshot/easyshot.c @@ -56,7 +56,7 @@ char save_path_stable[4096]; char open_dir[4096]; edit_box edit_save = {250,25,100,0xffffff,0x94AECE,0xFFFfff,0xffffff, - 0x10000000,sizeof(save_path),#save_path,0, 0b}; + 0x10000000,sizeof(save_path)-2,#save_path,0, 0b}; more_less_box delay = { 1, 0, 64, T_DELAY }; checkbox minimize = { T_MINIMIZE, true }; diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 427be11894..c02926d88c 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -1060,7 +1060,7 @@ void NewElement_Form(byte crt, dword strng) { new_element_active = crt; strcpy(#new_element_name, strng); - new_file_ed.size = new_file_ed.pos = strlen(strng); + EditBox_UpdateText(#new_file_ed, ed_focus+ed_always_focus); } if (new_element_active==3) DrawEolitePopup(T_RENAME, T_CANCEL); else DrawEolitePopup(T_CREATE, T_CANCEL); diff --git a/programs/cmm/eolite/include/properties.h b/programs/cmm/eolite/include/properties.h index 561963d23e..3619b329d5 100644 --- a/programs/cmm/eolite/include/properties.h +++ b/programs/cmm/eolite/include/properties.h @@ -38,8 +38,8 @@ char path_to_file[4096]; char file_name2[4096]; -edit_box file_name_ed = {230,59,32,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(file_name2),#file_name2,NULL, 1000000000000000b,2,2}; -edit_box path_to_file_ed = {160,120,79,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,sizeof(path_to_file),#path_to_file,NULL, 1000000000000000b,2,2}; +edit_box file_name_ed = {230,59,32,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(file_name2)-2,#file_name2,NULL, 0b,2,2}; +edit_box path_to_file_ed = {160,120,79,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,sizeof(path_to_file)-2,#path_to_file,NULL, 0b,2,2}; BDVK file_info_general; BDVK file_info_dirsize; @@ -185,7 +185,7 @@ void properties_dialog() { GetFileInfo(#file_path, #file_info_general); strcpy(#file_name2, #file_name); - file_name_ed.size = strlen(#file_name2); + EditBox_UpdateText(#file_name_ed, 0); if(itdir) dir_size.get(#file_path); ch_read_only.checked = file_info_general.readonly; ch_hidden.checked = file_info_general.hidden; diff --git a/programs/cmm/iconedit/canvas_resize.h b/programs/cmm/iconedit/canvas_resize.h index 2899125cd2..8005e03ca8 100644 --- a/programs/cmm/iconedit/canvas_resize.h +++ b/programs/cmm/iconedit/canvas_resize.h @@ -7,13 +7,13 @@ child_window Window_CanvasReSize = {#CanvasReSize_Thread}; // // //===================================================// -char text_columns[4]; -char text_rows[4]; +char text_columns[5]; +char text_rows[5]; -edit_box edit_columns = {60,NULL,NULL,0xffffff,0x94AECE,0xFFFfff,0xffffff, - 0x10000000,sizeof(text_columns)-1,#text_columns,0, 1000000000000010b}; -edit_box edit_rows = {60,NULL,NULL,0xffffff,0x94AECE,0xFFFfff,0xffffff, - 0x10000000,sizeof(text_rows)-1,#text_rows,0, 1000000000000000b}; +edit_box edit_columns = {60,NULL,NULL,0xffffff,0x94AECE,0xffc90E,0xffffff, + 0x10000000,sizeof(text_columns)-2,#text_columns,0, ed_figure_only+ed_focus}; +edit_box edit_rows = {60,NULL,NULL,0xffffff,0x94AECE,0xffc90E,0xffffff, + 0x10000000,sizeof(text_rows)-2,#text_rows,0, ed_figure_only}; #define BTN_APPLY 10 @@ -23,8 +23,8 @@ void CanvasReSize_Thread() sprintf(#text_columns, "%i", image.columns); sprintf(#text_rows, "%i", image.rows); - edit_columns.size = edit_columns.pos = edit_columns.shift = edit_columns.shift_old = strlen(#text_columns); - edit_rows.size = edit_rows.pos = edit_rows.shift = edit_rows.shift_old = strlen(#text_rows); + EditBox_UpdateText(#edit_columns, ed_figure_only+ed_focus); + EditBox_UpdateText(#edit_rows, ed_figure_only); SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER); loop() switch(WaitEvent()) @@ -94,7 +94,12 @@ void EventApplyClick() void EventTabClick() { - if (edit_columns.flags & 0b10) { edit_columns.flags -= 0b10; edit_rows.flags += 0b10; } - else { edit_columns.flags += 0b10; edit_rows.flags -= 0b10; } + if ( edit_columns.flags & ed_focus ) { + EditBox_UpdateText(#edit_columns, ed_figure_only); + EditBox_UpdateText(#edit_rows, ed_focus+ed_figure_only); + } else { + EditBox_UpdateText(#edit_columns, ed_focus+ed_figure_only); + EditBox_UpdateText(#edit_rows, ed_figure_only); + } DrawEditBoxes(); } \ No newline at end of file diff --git a/programs/cmm/iconedit/tools/screen_copy.h b/programs/cmm/iconedit/tools/screen_copy.h index 025cbc6881..bbafbcd5cb 100644 --- a/programs/cmm/iconedit/tools/screen_copy.h +++ b/programs/cmm/iconedit/tools/screen_copy.h @@ -22,7 +22,7 @@ void ScreenCopy_onMouseEvent(int mouseX, int mouseY, int lkm, int pkm) { for (i = 0; i < image.columns*image.rows; i++;) { - image.mas[i] = ESDWORD[i*3+screen_copy] & 0xFFFFFF; + image.mas[i] = ESDWORD[i*3+screen_copy]; // & 0xFFFFFF; } DrawCanvas(); diff --git a/programs/cmm/lib/obj/box_lib.h b/programs/cmm/lib/obj/box_lib.h index 0887aaf562..4e8da6d47d 100644 --- a/programs/cmm/lib/obj/box_lib.h +++ b/programs/cmm/lib/obj/box_lib.h @@ -86,12 +86,13 @@ PathShow_draw stdcall(#PathShow); #define ed_focus 10b //focused #define ed_shift 100b //flag is set when Shift is pressed #define ed_shift_on 1000b -#define ed_shift_bac 10000b //bif for Shift reset, if set the smth is selected +#define ed_shift_bac 10000b //bit for Shift reset, if set the smth is selected #define ed_left_fl 100000b #define ed_offset_fl 1000000b #define ed_insert 10000000b #define ed_mouse_on 100000000b -#define ed_mous_adn_b 100011000b +#define ed_mouse_adn_b 100011000b +#define ed_disabled 100000000000b #define ed_always_focus 100000000000000b #define ed_figure_only 1000000000000000b //numbers only #define ed_shift_cl 1111111111100011b @@ -124,10 +125,20 @@ dword width, cl_curs_y, shift, shift_old, - ed_height, - ed_char_width; + height, + char_width; }; +:void EditBox_UpdateText(dword ed, _flags) +{ + dword ed_text; + ESI = ed; + ESI.edit_box.offset = ESI.edit_box.shift = ESI.edit_box.shift_old = 0; + ESI.edit_box.flags = _flags; + ed_text = ESI.edit_box.text; + ESI.edit_box.pos = ESI.edit_box.size = strlen(ed_text); +} + struct scroll_bar { word size_x, diff --git a/programs/cmm/lib/strings.h b/programs/cmm/lib/strings.h index 3a7dece780..400920201d 100644 --- a/programs/cmm/lib/strings.h +++ b/programs/cmm/lib/strings.h @@ -127,10 +127,10 @@ inline signed int strncmp(dword text1,text2,len) */ inline fastcall unsigned int strlen( EDI) { - $xor eax, eax - $mov ecx, -1 - $REPNE $SCASB - EAX-=2+ECX; + $xor eax, eax + $mov ecx, -1 + $REPNE $SCASB + EAX-=2+ECX; } inline strnlen(dword str, dword maxlen) diff --git a/programs/cmm/liza/liza.c b/programs/cmm/liza/liza.c index ba18ed407b..8b9ed34c31 100644 --- a/programs/cmm/liza/liza.c +++ b/programs/cmm/liza/liza.c @@ -21,7 +21,7 @@ #include "../lib/obj/libimg.h" #include "../lib/obj/netcode.h" #include "../lib/obj/iconv.h" -//patternts +//patterns #include "../lib/patterns/history.h" #include "../lib/patterns/http_downloader.h" //images @@ -119,7 +119,7 @@ void main() { load_dll(libimg, #libimg_init,1); load_dll(iconv_lib, #iconv_open,0); OpenMailDat(); - SetEventMask(0x27); + SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER + EVM_STACK); LoginBoxLoop(); } diff --git a/programs/cmm/liza/login.c b/programs/cmm/liza/login.c index 42df804806..2d624f0be7 100644 --- a/programs/cmm/liza/login.c +++ b/programs/cmm/liza/login.c @@ -120,7 +120,6 @@ void LoginBoxLoop() switch(EAX & 0xFF) { case evMouse: - if (!CheckActiveProcess(Form.ID)) break; edit_box_mouse stdcall (#login_box); edit_box_mouse stdcall (#pass_box); break; diff --git a/programs/cmm/liza/mail_box.c b/programs/cmm/liza/mail_box.c index 9900fa89c3..2ccef1fbd5 100644 --- a/programs/cmm/liza/mail_box.c +++ b/programs/cmm/liza/mail_box.c @@ -159,7 +159,6 @@ void MailBoxLoop() { switch(EAX & 0xFF) { case evMouse: - IF (!CheckActiveProcess(Form.ID)) break; mouse.get(); if (!mouse.lkm) panels_drag=0; diff --git a/programs/cmm/liza/settings.c b/programs/cmm/liza/settings.c index a25802cc06..14178dff23 100644 --- a/programs/cmm/liza/settings.c +++ b/programs/cmm/liza/settings.c @@ -3,87 +3,85 @@ char *text1[] = {"POP server adress:", "POP server port:", "SMTP server adress:", "SMTP server port:", '\0'}; unsigned char POP_server1[128]="pop.server.com"; -unsigned char POP_server_port1[5]="110"; +unsigned char POP_server_port1[7]="110"; unsigned char SMTP_server1[128]="smtp.server.com"; -unsigned char SMTP_server_port1[5]="25"; -edit_box POP_server_box = {210,230,125 ,0xffffff,0x94AECE,0xffc90E,0xCACACA,0x10000000,sizeof(POP_server1),#POP_server1,0,100000000000b}; -edit_box POP_server_port_box = {210,230,160,0xffffff,0x94AECE,0xffc90E,0xCACACA,0x10000000,5,#POP_server_port1,0,100000000000b}; -edit_box SMTP_server_box = {210,230,195,0xffffff,0x94AECE,0xffc90E,0xCACACA,0x10000000,sizeof(SMTP_server1),#SMTP_server1,0,100000000000b}; -edit_box SMTP_server_port_box = {210,230,230,0xffffff,0x94AECE,0xffc90E,0xCACACA,0x10000000,5,#SMTP_server_port1,0,100000000000b}; +unsigned char SMTP_server_port1[7]="25"; +edit_box POP_server_box = {210,230,125,0xffffff,0x94AECE,0xffc90E,0xCACACA,0x10000000,sizeof(POP_server1)-2,#POP_server1,0,0}; +edit_box POP_server_port_box = {210,230,160,0xffffff,0x94AECE,0xffc90E,0xCACACA,0x10000000,sizeof(POP_server_port1)-2,#POP_server_port1,0,0}; +edit_box SMTP_server_box = {210,230,195,0xffffff,0x94AECE,0xffc90E,0xCACACA,0x10000000,sizeof(SMTP_server1)-2,#SMTP_server1,0,0}; +edit_box SMTP_server_port_box = {210,230,230,0xffffff,0x94AECE,0xffc90E,0xCACACA,0x10000000,sizeof(SMTP_server_port1)-2,#SMTP_server_port1,0,0}; checkbox automatic = { "Automatic configuration", true }; +void UpdateEditboxFlags(dword additional_flag) +{ + EditBox_UpdateText(#POP_server_box, additional_flag + 0); + EditBox_UpdateText(#POP_server_port_box, additional_flag + ed_figure_only + 0); + EditBox_UpdateText(#SMTP_server_box, additional_flag + 0); + EditBox_UpdateText(#SMTP_server_port_box, additional_flag + ed_figure_only + 0); +} + void SettingsDialog() { - int key, id; - - POP_server_box.size = strlen(#POP_server1); - POP_server_port_box.size = strlen(#POP_server_port1); - SMTP_server_box.size = strlen(#SMTP_server1); - SMTP_server_port_box.size = strlen(#SMTP_server_port1); - + int id; + UpdateEditboxFlags(ed_disabled); goto _OPT_WIN; - - loop() + loop() switch(WaitEvent()) { - switch(WaitEvent()) - { - case evMouse: - IF (GetProcessSlot(Form.ID)-GetActiveProcess()!=0) break; - edit_box_mouse stdcall(#POP_server_box); - edit_box_mouse stdcall(#POP_server_port_box); - edit_box_mouse stdcall(#SMTP_server_box); - edit_box_mouse stdcall(#SMTP_server_port_box); - break; - - case evButton: - id = GetButtonID(); - if (id==1) SaveAndExit(); - if (id==19) LoginBoxLoop(); - if (automatic.click(id)) - { - if (automatic.checked) { - POP_server_box.flags = POP_server_box.flags = POP_server_port_box.flags = SMTP_server_box.flags = SMTP_server_port_box.flags = 100000000000b; - POP_server_box.blur_border_color = POP_server_box.blur_border_color = POP_server_port_box.blur_border_color = - SMTP_server_box.blur_border_color = SMTP_server_port_box.blur_border_color = 0xCACACA; - } - else { - POP_server_box.flags = 0b10; - POP_server_port_box.flags = SMTP_server_box.flags = SMTP_server_port_box.flags = 0b; - POP_server_box.blur_border_color = POP_server_box.blur_border_color = POP_server_port_box.blur_border_color = - SMTP_server_box.blur_border_color = SMTP_server_port_box.blur_border_color = 0xFFFfff; - } - DrawOptionsWindow(); + case evMouse: + edit_box_mouse stdcall(#POP_server_box); + edit_box_mouse stdcall(#POP_server_port_box); + edit_box_mouse stdcall(#SMTP_server_box); + edit_box_mouse stdcall(#SMTP_server_port_box); + break; + + case evButton: + id = GetButtonID(); + if (id==1) SaveAndExit(); + if (id==19) LoginBoxLoop(); + if (automatic.click(id)) + { + if (automatic.checked) { + UpdateEditboxFlags(ed_disabled); + POP_server_box.blur_border_color = POP_server_port_box.blur_border_color = + SMTP_server_box.blur_border_color = SMTP_server_port_box.blur_border_color = 0xCACACA; } - break; - - case evKey: - GetKeys();; - - if (automatic.checked==true) break; - if (key_scancode==SCAN_CODE_TAB) - { - if (POP_server_box.flags & 0b10) { POP_server_box.flags -= 0b10; POP_server_port_box.flags += 0b10; } else - if (POP_server_port_box.flags & 0b10) { POP_server_port_box.flags -= 0b10; SMTP_server_box.flags += 0b10; } else - if (SMTP_server_box.flags & 0b10) { SMTP_server_box.flags -= 0b10; SMTP_server_port_box.flags += 0b10; } else - if (SMTP_server_port_box.flags & 0b10) { SMTP_server_port_box.flags -= 0b10; POP_server_box.flags += 0b10; } else - POP_server_box.flags = 0b10; - DrawOptionsWindow(); + else { + UpdateEditboxFlags(0); + POP_server_box.flags = 0b10; + POP_server_box.blur_border_color = POP_server_port_box.blur_border_color = + SMTP_server_box.blur_border_color = SMTP_server_port_box.blur_border_color = 0xFFFfff; } - - EAX=key_ascii<<8; - edit_box_key stdcall(#POP_server_box); - edit_box_key stdcall(#POP_server_port_box); - edit_box_key stdcall(#SMTP_server_box); - edit_box_key stdcall(#SMTP_server_port_box); - break; - - case evReDraw: _OPT_WIN: - if !(DefineWindow(OPTIONS_HEADER)) break; - DrawBar(0,0, Form.cwidth, Form.cheight, system.color.work); DrawOptionsWindow(); - break; - } + } + break; + + case evKey: + GetKeys();; + + if (automatic.checked==true) break; + if (key_scancode==SCAN_CODE_TAB) + { + if (POP_server_box.flags & ed_focus) { UpdateEditboxFlags(0); POP_server_port_box.flags += ed_focus; } else + if (POP_server_port_box.flags & ed_focus) { UpdateEditboxFlags(0); SMTP_server_box.flags += ed_focus; } else + if (SMTP_server_box.flags & ed_focus) { UpdateEditboxFlags(0); SMTP_server_port_box.flags += ed_focus; } else + if (SMTP_server_port_box.flags & ed_focus) { UpdateEditboxFlags(0); POP_server_box.flags += ed_focus; } else + { UpdateEditboxFlags(0); POP_server_box.flags = 0b10; } + DrawOptionsWindow(); + } + + EAX=key_ascii<<8; + edit_box_key stdcall(#POP_server_box); + edit_box_key stdcall(#POP_server_port_box); + edit_box_key stdcall(#SMTP_server_box); + edit_box_key stdcall(#SMTP_server_port_box); + break; + + case evReDraw: _OPT_WIN: + if !(DefineWindow(OPTIONS_HEADER)) break; + DrawBar(0,0, Form.cwidth, Form.cheight, system.color.work); + DrawOptionsWindow(); + break; } } diff --git a/programs/cmm/tmpdisk/t_gui.c b/programs/cmm/tmpdisk/t_gui.c index ad1e1fd837..e874fb4415 100644 --- a/programs/cmm/tmpdisk/t_gui.c +++ b/programs/cmm/tmpdisk/t_gui.c @@ -45,9 +45,9 @@ unsigned char icons[] = FROM "icons.raw"; #define TOPPANELH 68 #define BOTPANELH 26 -char new_disk_size[5]; +char new_disk_size[7]; edit_box edit_disk_size= {50,0,7,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000, - 4,#new_disk_size,0, 1000000000000010b}; + sizeof(new_disk_size)-2,#new_disk_size,0, ed_focus+ed_figure_only}; void Main_Window() { @@ -169,7 +169,7 @@ void GetSizeDisk() fr = GetFreeRAM() / 5 * 2; fr = itoa(fr / 2048); strcpy(#new_disk_size, fr); - edit_disk_size.size = edit_disk_size.pos = strlen(#new_disk_size); + EditBox_UpdateText(#edit_disk_size, edit_disk_size.flags); edit_box_draw stdcall (#edit_disk_size); } @@ -243,7 +243,7 @@ void DrawTmpDisks() WriteText(disk_pos_x[i]+27,disk_pos_y[i]+24, 0x80, 0x555555, ConvertSize(disk_sizes[real_id])); _PutImage(disk_pos_x[i]+6,disk_pos_y[i]+6, 14,14, 2*14*14*3+#icons); if (selected==i) { - if ( !asm test edit_disk_size.flags, 2) selection_color = selection_active; else selection_color = selection_inactive; + if ( edit_disk_size.flags & ed_focus) selection_color = selection_inactive; else selection_color = selection_active; DrawWideRectangle(disk_pos_x[i], disk_pos_y[i], 80, 40, 2, selection_color); PutPixel(disk_pos_x[i], disk_pos_y[i], 0xFFFfff); }