2,27 → 2,39 |
;Basic macros for use editbox ; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
|
macro use_editbox_draw |
{ |
edit_box: |
.draw: |
pushad |
.draw_1: |
;--- à¨á㥬 à ¬ªã --- |
mov edi,dword [esp+36] |
mov edi,[esp+36] |
and dword ed_text_color,17FFFFFFh |
mov ecx,ed_text_color |
mov ebx,ecx |
shr ecx,28 |
shl ebx,4 |
shr ebx,28 |
inc ebx |
mov eax,6 |
jecxz @f |
mov al, 8 |
@@: |
mul bl |
mov ed_char_width,eax |
mov al, 9 |
jecxz @f |
mov al, 16 |
@@: |
mul bl |
add eax,4 |
mov ed_height,eax |
call .draw_border |
.draw_bg_cursor_text: |
;--- ¨§¬¥ï¥¬ ᬥ饨¥, ¥á«¨ ¤® --- |
call .check_offset |
;--- à¨á㥬 ¢ãâà¥îî ®¡« áâì --- |
call .draw_bg |
;--- à¨á㥬 ¢ë¤¥«¥¨¥, ¯® shift ¥á«¨ ¥áâì --- |
call .draw_shift |
.draw_cursor_text: |
call .draw_text |
;--- à¨á㥬 ªãàá®à --- |
;--- ¬®¦¥â ¥£® ¥ ¤® à¨á®¢ âì --- |
test word ed_flags,ed_focus |
jz .editbox_exit |
call .draw_cursor |
34,7 → 46,6 |
ret 4 |
} |
|
|
macro use_editbox_key |
{ |
;========================================================== |
42,12 → 53,11 |
;========================================================== |
edit_box_key: |
pushad |
mov edi,dword [esp+36] |
mov edi,[esp+36] |
test word ed_flags,ed_focus ; ¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬ |
jz edit_box.editbox_exit |
test word ed_flags,ed_mouse_on or ed_disabled |
jnz edit_box.editbox_exit |
|
;-------------------------------------- |
; this code for Win-keys, works with |
; kernel SVN r.3356 or later |
62,8 → 72,8 |
pop ebx |
pop eax |
jmp edit_box.editbox_exit |
@@: |
pop ebx |
|
@@: pop ebx |
pop eax |
;-------------------------------------- |
;஢¥àª ¦ â shift ? |
127,7 → 137,7 |
;save for stdcall ebx,esi,edi,ebp |
edit_box_mouse: |
pushad |
mov edi,dword [esp+36] |
mov edi,[esp+36] |
test word ed_flags,ed_disabled |
jnz edit_box.editbox_exit |
;debug |
141,16 → 151,16 |
test eax,1 |
jnz edit_box_mouse.mouse_left_button |
and word ed_flags,ed_mouse_on_off |
mov ebx,dword ed_mouse_variable |
mov ebx,ed_mouse_variable |
push 0 |
pop dword [ebx] |
; mov dword [ebx],ebx |
jmp edit_box.editbox_exit |
|
.mouse_left_button: |
;---------------------------------------------------------- |
;--- ¡«®ª¨à®¢ª ®â 䮪ãá¨à®¢ª¨ ¢ ¤àã£¨å ¡®ªá å ¯à¨ ¯®¯ ¤ ¨¨ ¨å ªãàá®à |
;---------------------------------------------------------- |
mov eax,dword ed_mouse_variable |
mov eax,ed_mouse_variable |
push dword [eax] |
pop eax |
test eax,eax |
183,7 → 193,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
} |
|
|
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
;¨¦¥ à ᯮ«®¦¥ë äãªæ¨¨ ª®â®à묨 ॠ«¨§ã¥âáï ¢¥áì «£®à¨â¬ |
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
198,7 → 207,7 |
test word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
jz @f |
mov ebp,shift_color |
mov ebx,dword ed_shift_pos |
mov ebx,ed_shift_pos |
call edit_box_key.sh_cl_ |
@@: ret |
;---------------------------------------------------------- |
205,86 → 214,76 |
;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ⥪áâ -------------------------- |
;---------------------------------------------------------- |
edit_box.draw_text: |
;--- ¢ëç¨á«ï¥¬, ᪮«ìª® ¯®¬¥é ¥âáï ᨬ¢®«®¢ --- |
call edit_box.get_n |
mov esi,ed_size |
mov ebx,ed_offset |
sub esi,ebx |
sub esi,ed_offset |
cmp eax,esi |
jae @F |
jae @f |
mov esi,eax |
;--- à¨á㥬 ⥪áâ --- |
@@: mov eax,4 |
@@: |
test esi,esi |
jz @f |
mov eax,4 |
mov ebx,ed_left |
mov edx,ed_offset |
add ebx,2 |
shl ebx,16 |
add ebx,ed_top |
add ebx,2 |
mov ecx,ed_text_color |
add ebx,4 |
add edx,ed_text |
test word ed_flags,ed_pass |
jnz edit_box.draw_password |
test dword ed_flags,ed_pass |
jnz .password |
mov edx,ed_text |
add edx,ed_offset |
mcall |
@@: |
ret |
txt_pass db '*',0 |
proc edit_box.draw_password |
locals |
s_len dw ? ;¤«¨ ¢ë¢®¤¨¬®£® ⥪áâ |
endl |
cmp esi,1 |
jl .end_f ;¥á«¨ áâப ¯ãáâ ï |
mov [s_len],si |
xor esi,esi |
inc esi |
lea edx,[txt_pass] |
|
.password: |
mov ebp,esi |
mov esi,1 |
mov edx,txt_pass |
@@: |
mcall |
add ebx,6 shl 16 ;¤®¡ ¢«ï¥¬ áâ ¤ àâãî è¨à¨ã ᨬ¢®« |
dec word[s_len] |
cmp word[s_len],0 |
jg @b |
.end_f: |
rol ebx,16 |
add ebx,ed_char_width |
rol ebx,16 |
dec ebp |
jnz @b |
ret |
endp |
|
txt_pass db '*' |
;---------------------------------------------------------- |
;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ä® ---------------------------- |
;¢å®¤ë¥ ¤ ë¥ |
;eax |
;edx - color |
;---------------------------------------------------------- |
|
edit_box.draw_bg: |
mov ebx,ed_left |
add ebx,1 |
inc ebx |
shl ebx,16 |
add ebx,ed_width |
dec ebx |
mov edx,ed_color |
test word ed_flags, ed_disabled |
jz @f |
mov edx, 0x00cacaca ; TODO: add new value disabled_color to editbox struct |
@@: |
shl ebx,16 |
add ebx,ed_width |
sub ebx,1 |
;¢å®¤ ⮫쪮 梥â edx |
jz edit_box.draw_bg_eax |
mov edx, 0xCACACA ; TODO: add disabled_color field to editbox struct |
edit_box.draw_bg_eax: |
mov ecx,ed_top |
mov eax,13 |
add ecx,1 |
inc ecx |
shl ecx,16 |
add ecx,ed_height |
dec ecx |
mcall |
mcall 13 |
ret |
|
;---------------------------------------------------------- |
;--- ¯à®æ¥¤ãà ¯®«ãç¥¨ï ª®«¨ç¥á⢠ᨬ¢®«®¢ ¢ ⥪ã饩 è¨à¨¥ ª®¬¯®¥â |
;---------------------------------------------------------- |
edit_box.get_n: |
mov eax,ed_width ;¯®«ã祬 è¨à¨ã ª®¬¯®¥â |
xor edx,edx ;१ã«ìâ â à ᯮ« £ ¥âáï ¢ ¯ ॠedx:eax ¢ eax - ®áâ ⮪ |
sub eax,4 ;¢ëç⥬ 4 |
mov ebx,6 ;§ £à㧨¬ ¤¥«¨â¥«ì |
div ebx ;à §¤¥«¨¬ 6 |
mov eax,ed_width |
sub eax,4 |
xor edx,edx |
div word ed_char_width |
ret |
|
;---------------------------------------------------------- |
;--- ¯à®æ¥¤ãà à¨á®¢ ¨ï ªãàá®à -------------------------- |
;---------------------------------------------------------- |
294,33 → 293,31 |
mov ebx,cl_curs_x |
mov ecx,cl_curs_y |
jmp edit_box.draw_curs |
|
edit_box.draw_cursor: |
mov edx,ed_text_color |
mov ebx,ed_pos |
mov ecx,ed_offset |
sub ebx,ecx |
|
lea ebx,[ebx*2+ebx] |
shl ebx,1 |
;imul ebx,6 |
mov eax,ed_pos |
sub eax,ed_offset |
mul dword ed_char_width |
mov ebx,eax |
add ebx,ed_left |
inc ebx |
mov edx,ebx |
shl ebx,16 |
add ebx,edx |
mov ecx,ed_top |
inc ebx |
add ecx,2 |
mov ebp,ebx |
shl ebx,16 |
mov bx,bp |
mov ebp,ecx |
|
mov edx,ecx |
shl ecx,16 |
mov cx,bp |
add ecx,ed_height-4 |
|
add ecx,edx |
add ecx,ed_height |
sub ecx,4 |
mov cl_curs_x,ebx |
mov cl_curs_y,ecx |
mov edx,ed_text_color |
edit_box.draw_curs: |
mcall 38 |
ret |
|
;---------------------------------------------------------- |
;--- ¯à®æ¥¤ãà à¨á®¢ ¨ï à ¬ª¨ ---------------------------- |
;---------------------------------------------------------- |
361,6 → 358,7 |
mov bx,bp |
mcall |
ret |
|
;---------------------------------------------------------- |
;--- ¯à®¢¥àª , § 襫 «¨ ªãàá®à § £à ¨æë ¨, ¥á«¨ ¤®, --- |
;--- ¨§¬¥ï¥¬ ᬥ饨¥ ------------------------------------ |
374,20 → 372,17 |
mov ebx,ed_offset |
cmp ebx,ecx |
ja edit_box.sub_8 |
|
push ebx |
call edit_box.get_n ;¯®«ã稬 ª®«-¢® ᨬ¢®«®¢ ª®â®àë¥ ã¬¥é îâáï ¢ è¨à¨¥ ª®¬¯®¥â , ¢ ¯ ॠॣ¨áâ஢ edx:eax |
call edit_box.get_n |
pop ebx |
mov edx,ebx |
add edx,eax ;ed_offset+width editbox |
add edx,eax |
inc edx ;¥®¡å®¤¨¬® ¤«ï ®à¬ «ì®£® ¯®«®¦¥¨ï ªãàá®à ¢ ªà ©¥© «¥¢®© ¯®§¨æ¨¨ |
cmp edx,ecx |
ja @f |
|
mov edx,ed_size |
cmp edx,ecx |
je edit_box.add_end |
|
sub edx,ecx |
cmp edx,8 |
jbe edit_box.add_8 |
394,52 → 389,53 |
add ebx,8 |
jmp edit_box.chk_d |
|
@@: or word ed_flags,ed_offset_fl |
popad |
ret |
|
edit_box.sub_8: |
test ecx,ecx |
jz edit_box.sub_min |
cmp ebx,8 |
jbe edit_box.sub_min |
jz @f |
sub ebx,8 ;ebx=ed_offset |
jmp edit_box.chk_d |
edit_box.sub_min: |
ja edit_box.chk_d |
@@: |
xor ebx,ebx |
jmp edit_box.chk_d |
|
edit_box.add_end:sub edx,eax |
edit_box.add_end: |
sub edx,eax |
mov ebx,edx |
jmp edit_box.chk_d |
edit_box.add_8: add ebx,edx |
edit_box.chk_d: mov ed_offset,ebx |
|
edit_box.add_8: |
add ebx,edx |
edit_box.chk_d: |
mov ed_offset,ebx |
call edit_box.draw_bg |
and word ed_flags,ed_offset_cl |
edit_ex |
@@: |
or word ed_flags,ed_offset_fl |
popad |
ret |
|
edit_ex |
|
align 4 |
proc edit_box_set_text, edit:dword, text:dword |
pushad |
mov edi,dword[edit] |
mov edi,[edit] |
mov ecx,ed_max |
inc ecx ;ãç¨âë¢ ¥¬ ¡ã¤ã饥 ®¡à¥§ ¨¥ áâப¨ ¤«ï ascii 0 |
mov edi,dword[text] |
inc ecx |
mov edi,[text] |
xor al,al |
cld |
repne scasb ;¯®¨áª ¢ áâப¥ edi ᨬ¢®« al |
mov ecx,edi ;ecx = text + ¬¨. § 票¥ ¨§: 1) ed_max ¨«¨ 2) ¤«¨ë áâப¨ text |
|
mov edi,dword[edit] |
mov esi,dword[text] |
sub ecx,esi ;ecx = ¤«¨ áâப¨ text (® ¥ ¡®«ìè¥ ç¥¬ ed_max) |
repne scasb |
mov ecx,edi |
mov edi,[edit] |
mov esi,[text] |
sub ecx,esi |
dec ecx |
mov ed_size,ecx ;áâ ¢¨¬ ®¢ë© à §¬¥à áâப¨ |
mov ed_pos,ecx ;áâ ¢¨¬ ªãàá®à ¢ ª®¥æ ®¢®© áâப¨ |
and word ed_flags,ed_shift_cl ;ᨬ ¥¬ ¢ë¤¥«¥¨¥ ¥á«¨ ®® ¡ë«® |
mov ed_size,ecx |
mov ed_pos,ecx |
and word ed_flags,ed_shift_cl |
mov edi,ed_text |
repne movsb ;ª®¯¨à®¢ ¨¥ ⥪á⮢®© áâப¨ text ¢ edit_box |
mov byte[edi],0 ;áâ ¢¨¬ ascii 0 ¢ ª®æ¥ áâப¨ |
repne movsb |
mov byte[edi],0 |
popad |
ret |
endp |
448,35 → 444,33 |
macro use_key_func |
{ |
;¡à ¡®âª Shift ¤«ï áïâ¨ï ¢ë¤¥«¥¨ï ¥¨§¢¥á⮩ ®¡« á⨠|
edit_box_key.shift: ;;;;;;;SHIFT |
edit_box_key.shift: |
call edit_box.draw_bg |
test word ed_flags,ed_shift |
je edit_box_key.f_exit |
|
mov ebp,shift_color |
or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
mov ebx,dword ed_shift_pos |
mov ebx,ed_shift_pos |
call edit_box_key.sh_cl_ |
jmp edit_box.draw_cursor_text |
;;;;;;;;;;;;;;;;;;;;; |
|
edit_box_key.f_exit: |
call edit_box.check_offset |
and word ed_flags,ed_shift_cl |
call edit_box_key.enable_null |
jmp edit_box.draw_cursor_text |
|
edit_box_key.sh_cl_: |
;;;;;;SHIFT end |
;®¡à ¡®âª ®ç¨á⪨, ¯à¨ «¥¢®¬ - ¯à ¢®¬ ¤¢¨¦¥¨¨ ¢ë¤¥«¥¨ï |
;¤«ï ®¡à ¡®âª¨ áïâ¨ï ¢ë¤¥«¥¨ï |
;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
mov eax,dword ed_pos |
mov eax,ed_pos |
cmp eax,ebx |
|
jae edit_box_key.sh_n |
push eax ;¬¥ì襥 ¢ eax |
push ebx ;¡®«ì襥 |
jmp edit_box_key.sh_n1 |
;¥á«¨ ¨ ç¥ |
|
edit_box_key.sh_n: |
push ebx |
push eax |
489,17 → 483,16 |
mov edx,eax ;save |
pop ebx ;¡®«ì襥 |
pop eax ;¬¥ì襥 |
|
cmp eax,ecx ;áà ¢¥¨¥ ¬¥ì襣® á offset. |
jae edit_box_key.f_f ;¥á«¨ ¡®«ìè¥ |
xor eax,eax |
cmp edx,ebx ;cà ¢¨¬ à §¬¥à w_off á ¡®«ì訬 |
jb @f |
jnb @f |
mov ebx,edx |
@@: |
sub ebx,ecx |
jmp edit_box_key.nxt_f |
@@: mov ebx,edx |
sub ebx,ecx |
jmp edit_box_key.nxt_f |
|
edit_box_key.f_f: |
sub eax,ecx |
cmp edx,ebx ;cà ¢¨¬ à §¬¥à w_off á ¡®«ì訬 |
507,73 → 500,60 |
sub ebx,ecx |
sub ebx,eax |
jmp edit_box_key.nxt_f |
@@: |
mov ebx,edx |
|
@@: mov ebx,edx |
sub ebx,ecx |
sub ebx,eax |
edit_box_key.nxt_f: |
mov edx,ebx |
lea ebx,[eax*2+eax] |
shl ebx,1 |
mul dword ed_char_width |
xchg eax,ebx |
mul dword ed_char_width |
add ebx,ed_left |
inc ebx |
shl ebx,16 |
lea ecx,[edx*2+edx] |
shl ecx,1 |
mov bx,cx |
inc ebx |
inc eax |
mov bx, ax |
mov edx,ebp;shift_color |
call edit_box.draw_bg_eax |
jmp edit_box_key.enable_null |
|
call edit_box.draw_bg_eax |
@@: call edit_box_key.enable_null |
ret |
;;;;;;;;;;;;;;;;;;;;; |
;áâ ®¢ª - áï⨥ ¢ë¤¥«¥¨ï ¢ ®¤¨ ᨬ¢®« |
;;;;;;;;;;;;;;;;;;;;; |
edit_box_key.drw_sim: |
mov eax,dword ed_pos |
call edit_box_key.draw_rectangle ; à¨á®¢ âì ¯àאַ㣮«ì¨ª á § ¤ ë¬ æ¢¥â®¬ |
jmp @b |
;;;;;;;;;;;;;;;;;;;;; |
mov eax,ed_pos |
call edit_box_key.draw_rectangle |
jmp edit_box_key.enable_null |
|
;ãªæ¨ï ãáâ ®¢ª¨ ¢ë¤¥«¥¨ï ¯à¨ ¤¢¨¦¥¨¨ ¢«¥¢® ¨ ¢¯à ¢® ¨ ¦ ⨨ shift |
;®£¨ª : |
;;;;;;;;;; |
edit_box_key.draw_wigwag: |
;äãªæ¨ï ãáâ ®¢ª¨ ¯¥à¥¬¥ëå |
mov ebp,shift_color |
call edit_box.clear_cursor |
|
or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ ¢ë¤¥«¥®© ®¡« á⨠|
mov ebp,shift_color |
mov eax,dword ed_pos |
mov eax,ed_pos |
test word ed_flags,ed_left_fl |
jz edit_box_key.low |
jmp @f |
;;;;;;;;;; |
jnz edit_box_key.draw_rectangle |
dec eax |
jmp edit_box_key.draw_rectangle |
|
;ãªæ¨ï 㤠«¥¨ï ¢ë¤¥«¥¨ï ¯à¨ ¤¢¨¦¥¨¨ ¢«¥¢® ¨ ¢¯à ¢® ¨ ¦ ⨨ shift |
;®£¨ª : |
;;;;;;;;;; |
edit_box_key.draw_wigwag_cl: |
;äãªæ¨ï ãáâ ®¢ª¨ ¯¥à¥¬¥ëå |
mov ebp,ed_color |
call edit_box.clear_cursor |
|
mov ebp,ed_color |
mov eax,dword ed_pos |
mov eax,ed_pos |
test word ed_flags,ed_left_fl |
jz edit_box_key.low |
@@: call edit_box_key.draw_rectangle ; à¨á®¢ âì ¯àאַ㣮«ì¨ª § ªà 訢 ¥¬®© ®¡« á⨠|
ret |
edit_box_key.low: dec eax |
jmp @b |
jnz edit_box_key.draw_rectangle |
dec eax |
jmp edit_box_key.draw_rectangle |
|
;¢å®¤®© ¯ à ¬¥âà ebx - ed_pos |
edit_box_key.sh_first_sh: |
test word ed_flags,ed_shift |
je @f |
mov dword ed_shift_pos_old,ebx |
mov ed_shift_pos_old,ebx |
test word ed_flags,ed_shift_on |
jne @f |
mov dword ed_shift_pos,ebx |
mov ed_shift_pos,ebx |
or word ed_flags,ed_shift_on |
@@: ret |
;¡à ¡®âª ªà ©¨å ¯®«®¦¥¨© ¢ editbox ¯à¨ ¦ ⮬ shift |
586,12 → 566,12 |
je @f |
call edit_box.draw_bg |
mov ebp,ed_color |
mov ebx,dword ed_shift_pos |
mov ebx,ed_shift_pos |
call edit_box_key.sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â |
and word ed_flags,ed_shift_cl ; ®ç¨á⪠®â ⮣®, çâ® ã¡à «¨ ¢ë¤¥«¥¨¥ |
jmp edit_box.draw_cursor_text |
@@: |
and word ed_flags,ed_shift_off |
|
@@: and word ed_flags,ed_shift_off |
popad |
ret 4 |
;¯à®¢¥àª á®áâ®ï¨ï shift, ¡ë« «¨ ® ¦ â à ìè¥? |
598,13 → 578,11 |
edit_box_key.sh_enable: |
test word ed_flags,ed_shift |
jne edit_box_key.sh_ext_en ; à¨á®¢ âì § ªà è¥ë© ¯àאַ㣮«ì¨ª |
|
test word ed_flags,ed_shift_bac |
je @f |
call edit_box.check_offset |
|
mov ebp,ed_color |
mov ebx,dword ed_shift_pos |
mov ebx,ed_shift_pos |
call edit_box_key.sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â |
call edit_box_key.draw_wigwag_cl |
and word ed_flags,ed_shift_cl ; 1¢ à ¥ 㦮 |
612,16 → 590,16 |
|
@@: mov ebp,ed_color |
call edit_box.clear_cursor |
call edit_box.check_offset |
ret |
jmp edit_box.check_offset |
|
edit_box_key.sh_ext_en: |
call edit_box.check_offset |
test word ed_flags,ed_offset_fl |
je @f |
;¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ¨å ®ç¨á⪠|
mov eax,dword ed_shift_pos |
mov ebx,dword ed_pos |
mov ecx,dword ed_shift_pos_old |
mov eax,ed_shift_pos |
mov ebx,ed_pos |
mov ecx,ed_shift_pos_old |
;¯à®¢¥àª ¨ à¨á®¢ ¨¥ § ªà è¥ëå ®¡« á⥩ |
cmp eax,ecx |
je edit_box_key.1_shem |
630,17 → 608,21 |
ja edit_box_key.1_shem |
call edit_box_key.draw_wigwag_cl ;clear |
jmp edit_box_key.sh_e_end |
|
edit_box_key.smaller: |
cmp ecx,ebx |
jb edit_box_key.1_shem |
call edit_box_key.draw_wigwag_cl ;clear |
jmp edit_box_key.sh_e_end |
;alike = |
edit_box_key.1_shem: call edit_box_key.draw_wigwag |
edit_box_key.sh_e_end: and word ed_flags,ed_shift_off |
|
edit_box_key.1_shem: |
call edit_box_key.draw_wigwag |
edit_box_key.sh_e_end: |
and word ed_flags,ed_shift_off |
ret |
|
@@: mov ebp,shift_color |
mov ebx,dword ed_shift_pos |
mov ebx,ed_shift_pos |
call edit_box_key.sh_cl_ |
jmp edit_box_key.sh_e_end |
;äãªæ¨ï ¤«ï ®¡à ¡®âª¨ shift ¯à¨ ¦ ⨨ home and end |
650,20 → 632,21 |
test word ed_flags,ed_shift_bac |
je @f |
mov ebp,ed_color |
mov ebx,dword ed_shift_pos_old |
mov ebx,ed_shift_pos_old |
call edit_box_key.sh_cl_ |
|
@@: test word ed_flags,ed_shift |
@@: |
test word ed_flags,ed_shift |
je edit_box_key.sh_exit_ ;¢ë©â¨ |
mov ebp,shift_color |
mov ebx,dword ed_shift_pos |
mov ebx,ed_shift_pos |
call edit_box_key.sh_cl_ |
or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
jmp edit_box_key.sh_e_end |
|
edit_box_key.sh_exit_: |
call edit_box.draw_bg |
call edit_box.check_offset |
ret |
jmp edit_box.check_offset |
|
;äãªæ¨ï ¢¥á¥¨ï 0 ¯® ¤à¥áã ed_size+1 |
edit_box_key.enable_null: |
pusha |
675,7 → 658,9 |
inc eax |
@@: xor ebx,ebx |
mov [eax],bl |
edit_ex |
popad |
ret |
|
;- 㤠«¥¨¥ ᨬ¢®« |
;å®¤ë¥ ¤ ë¥ edx=ed_size;ecx=ed_pos |
edit_box_key.del_char: |
682,11 → 667,10 |
mov esi,ed_text |
test word ed_flags,ed_shift_on |
je @f |
mov eax,dword ed_shift_pos |
mov eax,ed_shift_pos |
mov ebx,esi |
cmp eax,ecx |
jae edit_box_key.dh_n |
|
mov ed_pos,eax ;çâ®¡ë ¥ ¡ë«® ã¡¥£ ¨ï ªãàá®à |
mov ebp,ecx |
sub ebp,eax |
693,10 → 677,9 |
add ebx,eax ;eax ¬¥ìè¥ |
sub edx,ecx |
add esi,ecx |
mov ed_shift_pos,ebp |
jmp edit_box_key.del_ch_sh |
|
mov dword ed_shift_pos,ebp |
jmp edit_box_key.del_ch_sh |
;¥á«¨ ¨ ç¥ |
edit_box_key.dh_n: |
mov ebp,eax |
sub ebp,ecx |
703,7 → 686,7 |
add ebx,ecx |
sub edx,eax |
add esi,eax |
mov dword ed_shift_pos,ebp |
mov ed_shift_pos,ebp |
jmp edit_box_key.del_ch_sh |
|
@@: add esi,ecx ;㪠§ ⥫ì + ᬥ饨¥ ª ॠ«ì®¬ã ¡ãä¥àã |
710,10 → 693,8 |
mov ebx,esi |
inc esi |
cld |
|
sub edx,ecx |
edit_box_key.del_ch_sh: |
|
push edi |
mov edi,ebx |
@@: |
721,7 → 702,6 |
stosb |
dec edx |
jns @b |
|
pop edi |
ret |
;¢ëç¨á«¨âì § ªà 訢 ¥¬ãî ®¡« áâì |
732,7 → 712,6 |
mov ebx,ed_offset |
add eax,ebx ;eax = w_off= ed_offset+width |
mov ebx,ebp ;ed_size |
|
cmp eax,ebx |
jb @f |
mov eax,ed_pos |
740,11 → 719,11 |
mov ecx,ed_offset |
sub eax,ecx |
jmp edit_box_key.nxt |
|
@@: mov ebx,ed_pos |
push ebx |
sub eax,ebx |
mov ebx,eax ;It is not optimal |
|
pop eax ;ed_pos |
mov ecx,ed_offset |
sub eax,ecx |
755,19 → 734,18 |
cmp ebp,edx |
je @f |
inc ebx |
|
@@: mov edx,ebx |
lea ebx,[eax*2+eax] |
shl ebx,1 |
@@: |
mul dword ed_char_width |
xchg eax,ebx |
mul dword ed_char_width |
add ebx,ed_left |
inc ebx |
shl ebx,16 |
lea ecx,[edx*2+edx] |
shl ecx,1 |
mov bx,cx |
inc eax |
mov bx, ax |
mov edx,ed_color |
call edit_box.draw_bg_eax |
ret |
jmp edit_box.draw_bg_eax |
|
;;;;;;;;;;;;;;;;;;; |
;;; ¡à ¡®âª ¯à¨¬¨â¨¢®¢ |
;;;;;;;;;;;;;;;;;;;; |
776,22 → 754,21 |
;eax=dword ed_pos |
;ebp=-梥â ed_color or shift_color |
edit_box_key.draw_rectangle: |
mov ecx,dword ed_offset |
sub eax,ecx |
lea ebx,[eax*2+eax] |
shl ebx,1 |
inc ebx |
add ebx,ed_left |
shl ebx,16 |
add ebx,6 |
sub eax,ed_offset |
mul dword ed_char_width |
add eax,ed_left |
inc eax |
shl eax,16 |
add eax,ed_char_width |
mov ebx,eax |
mov edx,ebp |
call edit_box.draw_bg_eax |
ret |
jmp edit_box.draw_bg_eax |
|
;;;;;;;;;;;;;;;;;; |
;;஢¥àª ¦ â «¨ shift |
;;;;;;;;;;;;;;;;;; |
edit_box_key.check_shift_ctrl_alt: |
pusha ;á®åà ¨¬ ¢á¥ ॣ¨áâàë |
pusha |
mcall 66,3 |
test al,11b |
je @f |
806,7 → 783,9 |
test al,110000b |
je @f |
or word ed_flags,ed_alt_on ;ãáâ ®¢¨¬ ä« £ Alt |
@@:edit_ex |
@@: |
popad |
ret |
} |
|
macro use_key_no_process up,down,esc,enter,tab,numl,capsl,scrolll |
836,25 → 815,21 |
cmp ah,9 ;TAB - ª« ¢¨è )) |
jz edit_box.editbox_exit |
end if |
|
if numl eq |
else |
cmp ah,4 ;Num Lock - ª« ¢¨è )) |
jz edit_box.editbox_exit |
end if |
|
if capsl eq |
else |
cmp ah,2 ;Caps Lock - ª« ¢¨è )) |
jz edit_box.editbox_exit |
end if |
|
if scrolll eq |
else |
cmp ah,1 ;Scroll Lock - ª« ¢¨è )) |
jz edit_box.editbox_exit |
end if |
|
} |
|
macro use_key_figures_only |
867,32 → 842,31 |
ja edit_box.editbox_exit |
@@: |
} |
|
macro are_key_shift_press |
{ |
test word ed_flags,ed_shift_on |
je @f |
;å®¤ë¥ ¤ ë¥ edx=ed_size;ecx=ed_pos |
; edx = ed_size, ecx = ed_pos |
push eax |
mov edx,ed_size |
mov ecx, ed_pos |
pusha |
;;;;;;;;;;;;;;;;;;;;; |
;clear input arrea |
; clear input area |
mov ebp,ed_color |
mov ebx,dword ed_shift_pos |
mov ebx,ed_shift_pos |
call edit_box_key.sh_cl_ |
mov ebp,ed_size |
call edit_box_key.clear_bg |
;;;;;;;;;;;;;;;;;;;;; |
popa |
call edit_box_key.del_char |
;;;; |
mov ebx,ed_size |
sub ebx,dword ed_shift_pos |
sub ebx,ed_shift_pos |
mov ed_size,ebx |
pop eax |
@@: |
} |
|
macro are_key_cur_end |
{ |
mov ecx,ed_size |
903,38 → 877,29 |
jae edit_box.editbox_exit |
@@: mov ebx, ed_pos |
cmp ebx,edx |
jl @f ; ¥á«¨ ¬¥ìè¥ ¨«¨ à ¢® |
jmp edit_box.editbox_exit |
|
@@: ; ᤢ¨£ ¥¬ ᨬ¢®«ë ¯®á«¥ ªãàá®à ¢¯à ¢® |
jnl edit_box.editbox_exit |
mov ecx,ed_size |
push edi eax |
mov ebp,edi |
mov esi,ed_text ; ª § â¥«ì ¡ãä¥à |
;㤥¬ à ¡®â âì á® áâப®© |
add esi,ecx ;add ed_size ¤®¡ ¢¨¬ max size |
mov esi,ed_text |
add esi,ecx |
mov edi,esi |
|
cmp ecx,ebx ;
᫨ ã á ¯®§¨æ¨ï ªãàá®à = ⥪ã饬ã à §¬¥àã ¯¥ç â ëå ᨬ¢®«®¢ â.¥. ªãàá®à á⮨⠢ ª®æ¥ |
cmp ecx,ebx |
je edit_box_key.In_k |
|
test dword bp_flags,ed_insert ;IF insert is enabled â.ª. edi ¨§¬¥¥, ¤à¥á㥬 ç¥à¥§ ebp |
test dword bp_flags,ed_insert |
jne edit_box_key.ins_v |
;clear |
pusha |
mov edi,ebp |
mov ebp,ed_size |
call edit_box_key.clear_bg |
popa |
sub ecx,ebx ; ©¤¥¬ ª®«-¢® ᨬ¢®«®¢ ¤«ï ¯¥à¥¤¢¨¦¥¨ï. |
inc edi ;¬¥á⨬ è¨ á¨¬¢®«ë ¢¯à ¢® |
sub ecx,ebx |
inc edi |
std |
inc ecx |
@@: |
;-------- |
lodsb |
stosb |
;-------- |
loop @b |
edit_box_key.In_k: |
cld |
942,30 → 907,28 |
mov al,ah |
stosb |
pop edi |
; ¢áâ ¢«ï¥¬ ª®¤ ª« ¢¨è¨ â㤠, £¤¥ ªãàá®à |
; 㢥«¨ç¨¢ ¥¬ § 票¥ à §¬¥à ¨ ¯®§¨æ¨¨ |
inc dword ed_size |
inc dword ed_pos |
call edit_box_key.draw_all2 |
jmp edit_box_key.shift |
} |
|
macro use_work_key |
{ |
edit_box_key.insert: test word ed_flags,ed_insert ;not word ed_insert |
edit_box_key.insert: |
test word ed_flags,ed_insert |
je @f |
and word ed_flags,ed_insert_cl |
jmp edit_box.editbox_exit |
|
@@: or word ed_flags,ed_insert |
jmp edit_box.editbox_exit |
@@: |
or word ed_flags,ed_insert |
jmp edit_box.editbox_exit |
|
edit_box_key.ins_v: |
; dec dword [ebp+48];ed_size ;processing is insert |
dec dword bp_size |
sub esi,ecx |
add esi,ebx |
mov edi,esi |
;clear |
pusha |
mov edi,ebp |
mov ebp,ed_pos |
972,7 → 935,7 |
call edit_box_key.clear_bg |
popa |
jmp edit_box_key.In_k |
;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
edit_box_key.delete: |
mov edx,ed_size |
mov ecx,ed_pos |
982,15 → 945,14 |
jne edit_box_key.del_bac |
popad |
ret 4 |
|
edit_box_key.bac_del: |
call edit_box_key.del_char |
jmp edit_box_key.draw_all |
;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;--- ¦ â ª« ¢¨è backspace --- |
|
edit_box_key.backspace: |
test word ed_flags,ed_shift_on |
jne edit_box_key.delete |
; ¯à®¢¥à塞, ªãàá®à ã «¥¢®£® ªà ï? |
mov ecx,ed_pos |
test ecx,ecx |
jnz edit_box_key.del_bac |
1007,22 → 969,19 |
jne edit_box_key.bac_del |
dec dword ed_pos |
edit_box_key.draw_all: |
push edit_box_key.shift;.draw_cursor_text;eax |
|
push edit_box_key.shift |
test word ed_flags,ed_shift_on |
je @f |
mov eax,dword ed_shift_pos |
mov eax,ed_shift_pos |
mov ebx,ed_size |
sub ebx,eax |
mov ed_size,ebx |
|
mov ebp,ed_color |
call edit_box.clear_cursor |
call edit_box.check_offset |
call edit_box.draw_bg |
ret |
jmp edit_box.draw_bg |
|
@@: dec dword ed_size |
|
edit_box_key.draw_all2: |
and word ed_flags,ed_shift_cl |
mov ebp,ed_color |
1029,9 → 988,8 |
call edit_box.clear_cursor |
call edit_box.check_offset |
mov ebp,ed_size |
call edit_box_key.clear_bg |
ret |
;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
jmp edit_box_key.clear_bg |
|
;--- ¦ â ª« ¢¨è left --- |
edit_box_key.left: |
mov ebx,ed_pos |
1044,7 → 1002,7 |
call edit_box.draw_shift |
call edit_box_key.sh_enable |
jmp edit_box.draw_cursor_text |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
;--- ¦ â ª« ¢¨è right --- |
edit_box_key.right: |
mov ebx,ed_pos |
1057,7 → 1015,7 |
call edit_box.draw_shift |
call edit_box_key.sh_enable |
jmp edit_box.draw_cursor_text |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
edit_box_key.home: |
mov ebx,ed_pos |
test ebx,ebx |
1069,10 → 1027,11 |
call edit_box.draw_shift |
call edit_box_key.sh_home_end |
jmp edit_box.draw_cursor_text |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
;--- ¦ â ª« ¢¨è end --- |
edit_box_key.end: |
mov ebx,ed_pos |
cmp ebx,dword ed_size |
cmp ebx,ed_size |
je edit_box_key.sh_st_of |
call edit_box_key.sh_first_sh |
mov eax,ed_size |
1081,7 → 1040,7 |
call edit_box.draw_shift |
call edit_box_key.sh_home_end |
jmp edit_box.draw_cursor_text |
;----------------------------------------------------------------------------- |
|
edit_box_key.ctrl_c: |
; add memory area |
mov ecx,ed_size |
1112,10 → 1071,9 |
pop ecx |
; remove unnecessary memory area |
mcall 68,13 |
;-------------------------------------- |
.exit: |
jmp edit_box.editbox_exit |
;----------------------------------------------------------------------------- |
|
edit_box_key.ctrl_v: |
mcall 54,0 |
; no slots of clipboard ? |
1125,7 → 1083,6 |
inc eax |
test eax,eax |
jz .exit |
|
sub eax,2 |
mov ecx,eax |
mcall 54,1 |
1137,7 → 1094,6 |
sub eax,2 |
test eax,eax |
jz .exit |
|
inc eax |
; check contents of container |
mov ebx,[eax+4] |
1144,17 → 1100,14 |
; check for text |
test ebx,ebx |
jnz .no_valid_text |
|
mov ebx,[eax+8] |
; check for cp866 |
cmp bl,1 |
jnz .no_valid_text |
|
mov ecx,[eax] |
sub ecx,3*4 |
cmp ecx,ed_max |
jb @f |
|
mov ecx,ed_max |
@@: |
mov esi,eax |
1168,7 → 1121,6 |
lodsb |
cmp al,0x0d ; EOS (end of string) |
je .replace |
|
cmp al,0x0a ; EOS (end of string) |
jne .continue |
.replace: |
1177,92 → 1129,71 |
stosb |
dec ecx |
jnz @b |
; rep movsb |
pop edi eax |
;-------------------------------------- |
.no_valid_text: |
; remove unnecessary memory area |
mov ecx,eax |
mcall 68,13 |
;-------------------------------------- |
.exit: |
jmp edit_box.draw_1 |
jmp edit_box.draw_bg_cursor_text |
} |
|
macro use_mouse_func |
{ |
;---------------------------------------------------------- |
;--- ¡à ¡®âª .mouse_wigwag |
;---------------------------------------------------------- |
edit_box_mouse.mouse_wigwag: |
push eax |
call edit_box.draw_bg |
call edit_box.draw_shift |
pop eax |
or word ed_flags,ed_shift_bac+ed_shift_on+ed_shift |
;¡à ¡®âª ¯®«®¦¥¨ï ¢ë¤¥«¥®£® ⥪áâ , ª®£¤ ¯à®¨á室¨â ¢ë室 § ¯à¥¤¥«ë editbox |
test eax,eax |
js edit_box_mouse.mleft |
shr eax,16 |
or word ed_flags,ed_shift_bac+ed_shift_on+ed_shift |
;;;;;;;;;;;;;;;;;; |
;;¯à®æ¥¤ãà ®¡à ¡®âª¨ ¯®«®¦¥¨ï ¢ë¤¥«¥®£® ⥪áâ , ª®£¤ ¯à®¨á室¨â ¢ë室 § ¯à¥¤¥«ë editbox |
;;;;;;;;;;;;;;;;;; |
test ax,0x8000 |
jnz edit_box_mouse.mleft |
|
mov ebx,ed_left |
cmp eax,ebx |
jb edit_box_mouse.mleft |
|
add ebx,ed_width |
cmp eax,ebx |
ja edit_box_mouse.mright |
|
sub ebx,ed_width |
|
sub eax,ed_left |
jc edit_box_mouse.mleft |
cmp ed_width,eax |
jc edit_box_mouse.mright |
xor edx,edx |
sub eax,ebx ; ¢ëç⥬ ¨§ ª®®à¤¨ â ¬ë誨 ¯® ®á¨ å ª®®à¤¨ âë ¤® editbox ¯® ®á¨ å |
mov ebx,6 |
div ebx |
;;;;;;;;;;;;;;;;;; |
;;¯à®æ¥¤ãà ®¡à ¡®âª¨ ¯®«®¦¥¨ï ¢ë¤¥«¥®£® ⥪áâ , ¢ ¯à¥¤¥« å ®¡« á⨠editbox |
;;;;;;;;;;;;;;;;;; |
div word ed_char_width |
;¡à ¡®âª ¯®«®¦¥¨ï ¢ë¤¥«¥®£® ⥪áâ , ¢ ¯à¥¤¥« å ®¡« á⨠editbox |
;®«ã稫¨ ª®®à¤¨ âë ¢ eax ¬ë誨, â.¥. ªã¤ ® ¯¥à¥¬¥á⨫ áì |
;¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ¨å ®ç¨á⪠|
add eax,ed_offset ;¤®¡ ¢¨¬ ᬥ饨¥ |
cmp eax,dword ed_size ;¥á«¨ ¢ë諨 § ¯à¥¤¥«ë, â® ¨ç¥£® ¥ ¤¥« âì |
add eax,ed_offset |
cmp eax,ed_size |
ja edit_box_mouse.mwigvag |
edit_box_mouse.mdraw: |
mov dword ed_pos,eax ;á®åà ¨¬ ®¢®¥ § 票¥ |
mov ed_pos,eax |
;¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ¨å ®ç¨á⪠|
mov ecx,dword ed_shift_pos |
mov ebx,dword ed_shift_pos_old |
mov dword ed_shift_pos_old,eax ;¢¥á¥¬ ®¢®¥ § 票¥ áâ ன ¯®§¨æ¨¨ ªãàá®à |
mov ecx,ed_shift_pos |
mov ebx,ed_shift_pos_old |
mov ed_shift_pos_old,eax |
;¯à®¢¥àª ¨ à¨á®¢ ¨¥ § ªà è¥ëå ®¡« á⥩ |
cmp ecx,ebx ;¢ëïá塞 ªã¤ ¡ë«® ¤¢¨¦¥¨¥ ®¤¨ è £ § ¤ |
cmp ecx,ebx |
je edit_box_mouse.m1_shem ;¤¢¨¦¥¨ï ¥ ¡ë«® à ¥¥ |
jb edit_box_mouse.msmaller ;¤¢¨¦¥¨¥ ¡ë«® -> |
cmp ebx,eax ;¤¢¨¦¥¨¥ ¡ë«® ¤® í⮣® <- ¨ âãâ ¬ë ¯à®¢¥à塞 ᥩç á ªã¤ ¤¢¨¦¥¨¥ ¯à®¨á室¨â |
ja edit_box_mouse.m1_shem ;¥á«¨ ¡ë«® ¤¢¨¦¥¨¥ <- ⮠㦮 § ªà á¨âì ®¡« áâì |
je edit_box_mouse.mwigvag ;¥á«¨ ¨§¬¥¥¨ï ¥ ¡ë«®, â® ¨ç¥£® ¥ ¤¥« âì |
mov ebp,ed_color ;âãâ 㦮 ®ç¨áâ¨âì ®¡« áâì c ed_pos ed_shift_pos_old |
;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
call edit_box_key.sh_cl_ |
jb edit_box_mouse.msmaller ;¡ë«® ¤¢¨¦¥¨¥ -> |
cmp ebx,eax |
ja edit_box_mouse.m1_shem ;¡ë«® ¤¢¨¦¥¨¥ <- |
je edit_box_mouse.mwigvag |
mov ebp,ed_color |
call edit_box_key.sh_cl_ ;®ç¨áâ¨âì ®¡« áâì c ed_pos ed_shift_pos_old |
jmp edit_box_mouse.mwigvag |
|
edit_box_mouse.msmaller: |
cmp ebx,eax |
jb edit_box_mouse.m1_shem |
mov ebp,ed_color |
;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
call edit_box_key.sh_cl_ |
jmp edit_box_mouse.mwigvag |
;alike = |
|
edit_box_mouse.m1_shem: |
mov ebp,shift_color |
;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
mov ebx,ecx |
call edit_box_key.sh_cl_ |
jmp edit_box_mouse.mwigvag |
edit_box_mouse.mwigvag: |
and word ed_flags,ed_shift_mcl |
jmp edit_box.draw_cursor_text |
|
edit_box_mouse.mleft: |
mov eax,ed_pos |
cmp eax,0 |
1275,6 → 1206,7 |
call edit_box_key.sh_cl_ |
pop eax |
jmp edit_box_mouse.mdraw |
|
edit_box_mouse.mright: |
mov eax,ed_pos |
mov ebx,ed_size |
1291,35 → 1223,25 |
} |
|
macro use_work_mouse |
;---------------------------------------------------------- |
;--- ¥ 㤥ন¢ ¥¬ «¨ ¬ë ª« ¢¨èã ¬ë誨, ¯¥à¥¬¥é ï ªãàá®à, ¢® ¢á¥ à §ë¥ áâ®à®ë? |
;---------------------------------------------------------- |
; ¥ 㤥ন¢ ¥¬ «¨ ¬ë ª« ¢¨èã ¬ë誨, ¯¥à¥¬¥é ï ªãàá®à? |
{ |
test word ed_flags,ed_mouse_on |
jne edit_box_mouse.mouse_wigwag |
;---------------------------------------------------------- |
;--- ¯à®¢¥à塞, ¯®¯ ¤ ¥â «¨ ªãàá®à ¢ edit box ------------- |
;---------------------------------------------------------- |
; ¯à®¢¥à塞, ¯®¯ ¤ ¥â «¨ ªãàá®à ¢ edit box |
mov ebx,ed_top |
cmp ax,bx |
jl edit_box_mouse._blur;.mouse_end_no_focus |
|
jl edit_box_mouse._blur |
add ebx,ed_height |
cmp ax,bx |
jg edit_box_mouse._blur;.mouse_end_no_focus |
|
jg edit_box_mouse._blur |
shr eax,16 |
|
mov ebx,ed_left |
cmp ax,bx |
jl edit_box_mouse._blur;.mouse_end_no_focus |
|
jl edit_box_mouse._blur |
add ebx,ed_width |
|
cmp ax,bx |
jg edit_box_mouse._blur;.mouse_end_no_focus |
|
;--- ¨§¬¥ï¥¬ ¯®§¨æ¨î ªãàá®à --- |
jg edit_box_mouse._blur |
; ¨§¬¥ï¥¬ ¯®§¨æ¨î ªãàá®à |
push eax |
mov ebp,ed_color |
call edit_box.clear_cursor |
1327,22 → 1249,17 |
edit_box_mouse._mvpos: |
xor edx,edx |
sub eax,ed_left |
|
mov ebx,6 |
div bx |
div word ed_char_width |
add eax,ed_offset |
cmp eax,ed_size |
jna edit_box_mouse._mshift |
mov eax,ed_size |
|
edit_box_mouse._mshift: |
;;;;;;; |
;;¥ªæ¨ï ®¡à ¡®âª¨ shift ¨ ¢ë¤¥«¥¨ï ¯® shift |
;;;;;;; |
; ᥪæ¨ï ®¡à ¡®âª¨ shift ¨ ¢ë¤¥«¥¨ï ¯® shift |
test word ed_flags,ed_shift_bac |
je @f |
mov ebp,dword ed_color |
mov ebx,dword ed_shift_pos |
mov ebp,ed_color |
mov ebx,ed_shift_pos |
push eax |
call edit_box_key.sh_cl_ |
and word ed_flags,ed_shift_bac_cl |
1350,56 → 1267,46 |
@@: |
test word ed_flags,ed_mouse_on |
jne @f |
mov dword ed_shift_pos,eax |
mov ed_shift_pos,eax |
or word ed_flags,ed_mouse_on |
mov dword ed_pos,eax |
mov ebx,dword ed_mouse_variable |
mov ed_pos,eax |
mov ebx,ed_mouse_variable |
push edi |
pop dword [ebx] |
bts word ed_flags,1 ;ãáâ ®¢ª 䮪ãá |
bts word ed_flags,1 |
call edit_box.draw_bg |
jmp edit_box_mouse.m_sh |
@@: |
cmp eax,dword ed_shift_pos ;¥á«¨ ¯®§¨æ¨¨ ¥ ¨§¬¥¨«¨áì |
|
@@: cmp eax,ed_shift_pos |
je edit_box.editbox_exit |
mov ed_pos,eax |
call edit_box.draw_bg |
mov ebp,dword shift_color |
mov ebx,dword ed_shift_pos |
mov ebp,shift_color |
mov ebx,ed_shift_pos |
call edit_box_key.sh_cl_ |
or word ed_flags,ed_mous_adn_b ;ãáâ ®¢¨¬ ¡¨â, çâ® ¬ë ¢ë¤¥«¨«¨ +shift_on + |
or word ed_flags,ed_mous_adn_b |
edit_box_mouse.m_sh: |
call edit_box.draw_text |
call edit_box.draw_cursor |
;---------------------------------------------------------- |
;--- ¯à®æ¥¤ãà ãáâ ®¢ª¨ 䮪ãá --------------------------- |
;---------------------------------------------------------- |
; ¯à®æ¥¤ãà ãáâ ®¢ª¨ 䮪ãá |
jmp edit_box_mouse.drc |
|
edit_box_mouse._blur: |
test word ed_flags,ed_always_focus |
jne edit_box.editbox_exit |
btr word ed_flags,1 ; ¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬ |
jnc edit_box.editbox_exit |
|
mov ebp,ed_color |
call edit_box.clear_cursor |
edit_box_mouse.drc: call edit_box.draw_border |
edit_box_mouse.drc: |
call edit_box.draw_border |
jmp edit_box.editbox_exit |
} |
|
|
; ªà®á ¢ë室 |
macro edit_ex |
{ |
popad |
ret |
} |
macro debug |
{ |
;----------- ®â« ¤ª |
pushad |
; mov dword [ed_buffer.2],0 |
; mov eax,edi |
mov eax,dword [ed_buffer.2] |
mov edi,ed_buffer.3 |
call .str |
1441,4 → 1348,4 |
ret ;¢¥àãâìáï ®ç¥ì ¨â¥à¥áë© å®¤, â.ª. ¯®ª ¢ á⥪¥ åà ¨âáï ª®«-¢® ¢ë§®¢®¢, â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï |
} |
|
ed_struc_size=76 |
ed_struc_size=84 |