2018-10-24 21:41:08 +02:00
SCAN_LWIN_RELEASE = 0xDB
SCAN_RWIN_RELEASE = 0xDC
2016-12-07 09:31:30 +01:00
align 16
2009-10-23 16:36:21 +02:00
edit_box:
2009-02-13 10:04:33 +01:00
.draw:
2020-05-14 21:14:14 +02:00
pushad
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
2016-11-05 05:15:05 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
mul bl
mov ed_char_width , eax
mov al , 9
jecxz @ f
mov al , 16
2016-11-05 05:15:05 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
mul bl
add eax , 4
mov ed_height , eax
call .draw_border
2009-02-13 10:04:33 +01:00
.draw_bg_cursor_text:
2020-05-14 21:14:14 +02:00
;test word ed_flags,ed_focus ; for unfocused controls =>
;jz .skip_offset ; do not recalculate offset
call .check_offset
;.skip_offset:
call .draw_bg
test word ed_flags , ed_focus ; do not draw selection(named shift)
jz .draw_cursor_text ;
call .draw_shift
2009-02-13 10:04:33 +01:00
.draw_cursor_text:
2020-05-14 21:14:14 +02:00
call .draw_text
test word ed_flags , ed_focus ; and dosn`t draw cursor
jz .editbox_exit
call .draw_cursor
2009-02-13 10:04:33 +01:00
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;<3B> <> 騩 <20> <> 室 <20> <> editbox <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> 㭪権 <20> <20> <> <EFBFBD> <EFBFBD> <20> <> ࠡ<EFBFBD> <E0A0A1> 稪<EFBFBD> <E7A8AA> ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.editbox_exit:
2020-05-14 21:14:14 +02:00
popad
ret 4
2009-02-13 10:04:33 +01:00
;==========================================================
;=== <20> <> ࠡ<EFBFBD> ⪠ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> =================================
;==========================================================
2016-12-07 09:31:30 +01:00
align 16
2009-02-13 10:04:33 +01:00
edit_box_key:
2020-05-14 21:14:14 +02:00
pushad
mov edi ,[ esp + 36 ]
test word ed_flags , ed_focus ; <20> <20> <> <20> 䮪<> <E4AEAA> <EFBFBD> , <20> <> 室<EFBFBD> <E5AEA4>
jz edi t_box.editbox_exit
test word ed_flags , ed_mouse_on or ed_disabled
jnz edi t_box.editbox_exit
2013-03-08 19:18:59 +01:00
;--------------------------------------
; this code for Win-keys, works with
; kernel SVN r.3356 or later
2020-05-14 21:14:14 +02:00
mcall SF_KEYBOARD , SS F_GET_CONTROL_KEYS
test ah , $ 06 ; LWin ($02) & RWin ($04)
jnz edi t_box.editbox_exit
2013-03-08 19:18:59 +01:00
;--------------------------------------
2009-02-13 10:04:33 +01:00
;<3B> <EFBFBD> ઠ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> shift ?
2020-05-14 21:14:14 +02:00
test al , $ 03
je @ f
or word ed_flags , ed_shift ;<3B> <> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> 䫠<> Shift
@ @ :
and word ed_flags , ed_ctrl_off ; <20> <> <EFBFBD> <EFBFBD> ⨬ 䫠<> Ctrl
test al , $ 0 C
je @ f
or word ed_flags , ed_ctrl_on ;<3B> <> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> 䫠<> Ctrl
@ @ :
and word ed_flags , ed_alt_off ; <20> <> <EFBFBD> <EFBFBD> ⨬ 䫠<> Alt
test al , $ 30
je @ f
or word ed_flags , ed_alt_on ;<3B> <> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> 䫠<> Alt
@ @ :
2009-02-13 10:04:33 +01:00
;----------------------------------------------------------
;--- <20> <EFBFBD> <E0AEA2> 塞, <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> --------------------------------
;----------------------------------------------------------
2020-05-14 21:14:14 +02:00
mov eax ,[ esp + 28 ]
2018-10-24 21:41:08 +02:00
; get scancode in ah
2020-05-14 21:14:14 +02:00
ror eax , 8
2018-10-24 21:41:08 +02:00
; check for ctrl+ combinations
2020-05-14 21:14:14 +02:00
test word ed_flags , ed_ctrl_on
jz @ f
cmp ah , SCAN_CODE_X ; Ctrl + X
je edi t_box_key.ctrl_x
cmp ah , SCAN_CODE_C ; Ctrl + C
je edi t_box_key.ctrl_c
cmp ah , SCAN_CODE_V ; Ctrl + V
je edi t_box_key.ctrl_v
cmp ah , SCAN_CODE_A ; Ctrl + A
je edi t_box_key.ctrl_a
jmp edi t_box.editbox_exit
2014-03-01 20:33:34 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
cmp ah , SCAN_CODE_SPACE
ja @ F
cmp al , ASCII_KEY_BACK
jz edi t_box_key.backspace
cmp ah , SCAN_CODE_ESCAPE
jz edi t_box.editbox_exit
cmp ah , SCAN_CODE_TAB
jz edi t_box.editbox_exit
cmp ah , SCAN_CODE_RETURN
jz edi t_box.editbox_exit
jmp .printable_character
2016-12-07 09:31:30 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
cmp ah , SCAN_CODE_DELETE
ja edi t_box.editbox_exit
cmp ah , SCAN_CODE_HOME
jb edi t_box.editbox_exit
cmp ax , SCAN_CODE_CLEAR shl 8 + ASCII_KEY_CLEAR ; not operate numpad unlocked 5
jz edi t_box.editbox_exit
;here best place to filter up,down,pgup,pgdown
cmp al , ASCII_KEY_LEFT
jb .printable_character
and eax , $ F
mov ebx , .unlock_numpad_filtration
jmp dword [ ebx + eax * 4 ]
.unlock_numpad_filtration \
dd edi t_box_key.left , \ ; LEFT
edit_box.editbox_exit , \ ; DOWN
edit_box.editbox_exit , \ ; UP
edit_box_key.right , \ ; RIGHT
edit_box_key.home , \ ; HOME
edit_box_key.end , \ ; END
edit_box_key.delete , \ ; DELETE
edit_box.editbox_exit , \ ; PGDN
edit_box.editbox_exit , \ ; PGUP
edit_box_key.insert ; INSERT
.printable_character:
test word ed_flags , ed_figure_only ; ⮫쪮 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ?
jz @ f
cmp al , '0'
jb edi t_box.editbox_exit
cmp al , '9'
ja edi t_box.editbox_exit
@ @ :
; restore ascii code
rol eax , 8
2016-12-07 09:31:30 +01:00
2009-02-13 10:04:33 +01:00
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2011-02-09 02:01:22 +01:00
;<3B> <EFBFBD> ઠ <20> <> shift, <20> <> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
2009-02-13 10:04:33 +01:00
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2020-05-14 21:14:14 +02:00
test word ed_flags , ed_shift_on
je @ f
2016-12-07 09:31:30 +01:00
; edx = ed_size, ecx = ed_pos
2020-05-14 21:14:14 +02:00
push eax
mov edx , ed_size
mov ecx , ed_pos
pusha
2016-12-07 09:31:30 +01:00
; clear input area
2020-05-14 21:14:14 +02:00
mov ebp , ed_color
movzx ebx , word ed_shift_pos
call edi t_box_key.sh_cl_
mov ebp , ed_size
call edi t_box_key.clear_bg
popa
call edi t_box_key.del_char
mov ebx , ed_size
sub bx , ed_shift_pos
mov ed_size , ebx
pop eax
2016-12-07 09:31:30 +01:00
@ @ :
2009-02-13 10:04:33 +01:00
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; <20> <EFBFBD> <E0AEA2> 塞, <20> <> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> + <20> <> <EFBFBD> 쭥<EFBFBD> <ECADA5> <EFBFBD> <EFBFBD> <20> <> ࠡ<EFBFBD> ⪠
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2020-05-14 21:14:14 +02:00
mov ecx , ed_size
mov edx , ed_max
test word ed_flags , ed_insert
jne @ f
cmp ecx , edx
jae edi t_box.editbox_exit
@ @ : mov ebx , ed_pos
cmp ebx , edx
jnl edi t_box.editbox_exit
mov ecx , ed_size
push edi eax
mov ebp , edi
mov esi , ed_text
add esi , ecx
mov edi , esi
cmp ecx , ebx
je edi t_box_key.In_k
test dword bp _flags , ed_insert
jne edi t_box_key.ins_v
pusha
mov edi , ebp
mov ebp , ed_size
call edi t_box_key.clear_bg
popa
sub ecx , ebx
inc edi
std
inc ecx
2016-12-07 09:31:30 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
lodsb
stosb
loop @ b
2016-12-07 09:31:30 +01:00
edit_box_key.In_k:
2020-05-14 21:14:14 +02:00
cld
pop eax
mov al , ah
stosb
pop edi
inc dword ed_size
inc dword ed_pos
call edi t_box_key.draw_all2
jmp edi t_box_key.shift
2016-12-07 09:31:30 +01:00
2009-02-13 10:04:33 +01:00
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2018-10-29 19:16:01 +01:00
;<3B> <> ࠡ<EFBFBD> ⪠ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> insert,delete,backspace,home,end,left,right
2009-02-13 10:04:33 +01:00
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2016-12-07 09:31:30 +01:00
edit_box_key.insert:
2020-05-14 21:14:14 +02:00
xor word ed_flags , ed_insert
jmp edi t_box.editbox_exit
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
edit_box_key.ins_v:
2020-05-14 21:14:14 +02:00
dec dword bp _size
sub esi , ecx
add esi , ebx
mov edi , esi
pusha
mov edi , ebp
mov ebp , ed_pos
call edi t_box_key.clear_bg
popa
jmp edi t_box_key.In_k
2009-02-13 10:04:33 +01:00
2016-12-07 09:31:30 +01:00
edit_box_key.delete:
2020-05-14 21:14:14 +02:00
mov edx , ed_size
mov ecx , ed_pos
cmp edx , ecx
jg edi t_box_key.bac_del
test word ed_flags , ed_shift_on
jne edi t_box_key.del_bac
popad
ret 4
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
edit_box_key.bac_del:
2020-05-14 21:14:14 +02:00
call edi t_box_key.del_char
jmp edi t_box_key.draw_all
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
edit_box_key.backspace:
2020-05-14 21:14:14 +02:00
test word ed_flags , ed_shift_on
jne edi t_box_key.delete
mov ecx , ed_pos
test ecx , ecx
jnz edi t_box_key.del_bac
popad
ret 4
2010-09-17 18:05:21 +02:00
2016-12-07 09:31:30 +01:00
edit_box_key.del_bac:
2020-05-14 21:14:14 +02:00
mov edx , ed_size
cmp edx , ecx ;if ed_pos=ed_size
je @ f
dec ecx
call edi t_box_key.del_char
@ @ : test word ed_flags , ed_shift_on
jne edi t_box_key.bac_del
dec dword ed_pos
2016-12-07 09:31:30 +01:00
edit_box_key.draw_all:
2020-05-14 21:14:14 +02:00
push edi t_box_key.shift
test word ed_flags , ed_shift_on
je @ f
movzx eax , word ed_shift_pos
mov ebx , ed_size
sub ebx , eax
mov ed_size , ebx
mov ebp , ed_color
call edi t_box.clear_cursor
call edi t_box.check_offset
and word ed_flags , ed_shift_cl
jmp edi t_box.draw_bg
@ @ : dec dword ed_size
2016-12-07 09:31:30 +01:00
edit_box_key.draw_all2:
2020-05-14 21:14:14 +02:00
and word ed_flags , ed_shift_cl
mov ebp , ed_color
call edi t_box.clear_cursor
call edi t_box.check_offset
mov ebp , ed_size
jmp edi t_box_key.clear_bg
2009-02-13 10:04:33 +01:00
2016-12-07 09:31:30 +01:00
;--- <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> left ---
edit_box_key.left:
2020-05-14 21:14:14 +02:00
mov ebx , ed_pos
test ebx , ebx
jz edi t_box_key.sh_st_of
or word ed_flags , ed_left_fl
call edi t_box_key.sh_first_sh
dec dword ed_pos
call edi t_box.draw_bg
call edi t_box.draw_shift
call edi t_box_key.sh_enable
jmp edi t_box.draw_cursor_text
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
;--- <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> right ---
edit_box_key.right:
2020-05-14 21:14:14 +02:00
mov ebx , ed_pos
cmp ebx , ed_size
je edi t_box_key.sh_st_of
and word ed_flags , ed_right_fl
call edi t_box_key.sh_first_sh
inc dword ed_pos
call edi t_box.draw_bg
call edi t_box.draw_shift
call edi t_box_key.sh_enable
jmp edi t_box.draw_cursor_text
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
edit_box_key.home:
2020-05-14 21:14:14 +02:00
mov ebx , ed_pos
test ebx , ebx
jz edi t_box_key.sh_st_of
call edi t_box_key.sh_first_sh
xor eax , eax
mov ed_pos , eax
call edi t_box.draw_bg
call edi t_box.draw_shift
call edi t_box_key.sh_home_end
jmp edi t_box.draw_cursor_text
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
;--- <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> end ---
edit_box_key.end:
2020-05-14 21:14:14 +02:00
mov ebx , ed_pos
cmp ebx , ed_size
je edi t_box_key.sh_st_of
call edi t_box_key.sh_first_sh
mov eax , ed_size
mov ed_pos , eax
call edi t_box.draw_bg
call edi t_box.draw_shift
call edi t_box_key.sh_home_end
jmp edi t_box.draw_cursor_text
2017-09-08 10:27:34 +02:00
;----------------------------------------
StrInsert:
2018-11-19 11:21:18 +01:00
; SizeOf(TmpBuf) >= StrLen(Src) + StrLen(Dst) + 1
2018-09-22 09:58:01 +02:00
Dst equ [ esp + 16 ] ; - destination buffer
Src equ [ esp + 12 ] ; - source to insert from
Pos equ [ esp + 8 ] ; - position for insert
DstMax equ [ esp + 4 ] ; - maximum Dst length(exclude terminating null)
SrcCount equ [ esp - 4 ]
DstCount equ [ esp - 8 ]
2020-05-14 21:14:14 +02:00
TmpBuf equ [ esp - 12 ] ; - temporary buffer
mov edi , Src
mov ecx , - 1
xor eax , eax
repne scasb
mov eax , - 2
sub eax , ecx
mov SrcCount , eax
mov edi , Ds t
add edi , Pos
mov ecx , - 1
xor eax , eax
repne scasb
mov eax , - 2
sub eax , ecx
inc eax
mov Ds tCount , eax
mov ecx , eax
add ecx , SrcCount
add ecx , Pos
mcall SF_SYS_MISC , SS F_MEM_ALLOC
mov TmpBuf , eax
mov esi , Ds t
mov edi , TmpBuf
mov ecx , Pos
mov edx , ecx
rep movsb
mov esi , Src
mov edi , TmpBuf
add edi , Pos
mov ecx , SrcCount
add edx , ecx
rep movsb
mov esi , Pos
add esi , Ds t
mov ecx , Ds tCount
add edx , ecx
rep movsb
mov esi , TmpBuf
mov edi , Ds t
2018-11-19 11:21:18 +01:00
; ecx = MIN(edx, DstSize)
2020-05-14 21:14:14 +02:00
cmp edx , Ds tMax
sbb ecx , ecx
and edx , ecx
not ecx
and ecx , Ds tMax
add ecx , edx
mov eax , ecx ; return total length
rep movsb
mov ecx , TmpBuf
mcall SF_SYS_MISC , SS F_MEM_FREE
ret 16
2018-11-19 11:21:18 +01:00
rest ore Ds t
rest ore Src
rest ore Pos
2017-09-08 10:27:34 +02:00
rest ore Ds tSize
2018-11-19 11:21:18 +01:00
rest ore TmpBuf
2018-09-22 09:58:01 +02:00
rest ore SrcCount
rest ore Ds tCount
2018-11-19 11:21:18 +01:00
;----------------------------------------
2017-09-09 17:27:54 +02:00
edit_box_key.ctrl_x:
2020-05-14 21:14:14 +02:00
test word ed_flags , ed_shift_on
jz edi t_box.editbox_exit
push dword 'X' ; this value need below to determine which action is used
jmp edi t_box_key.ctrl_c.pushed
2018-11-19 11:21:18 +01:00
2016-12-07 09:31:30 +01:00
edit_box_key.ctrl_c:
2020-05-14 21:14:14 +02:00
test word ed_flags , ed_shift_on
jz edi t_box.editbox_exit
push dword 'C' ; this value need below to determine which action is used
2018-11-19 11:21:18 +01:00
.pushed:
2016-12-07 09:31:30 +01:00
; add memory area
2020-05-14 21:14:14 +02:00
mov ecx , ed_size
add ecx , 3 * 4
mcall SF_SYS_MISC , SS F_MEM_ALLOC
2016-12-07 09:31:30 +01:00
; building the clipboard slot header
2020-05-14 21:14:14 +02:00
xor ecx , ecx
mov [ eax + 4 ], ecx ; type 'text'
inc ecx
mov [ eax + 8 ], ecx ; cp866 text encoding
mov ecx , ed_pos
movzx ebx , word ed_shift_pos
sub ecx , ebx
2017-09-08 10:27:34 +02:00
.abs: ; make ecx = abs(ecx)
neg ecx
jl .abs
2020-05-14 21:14:14 +02:00
add ecx , 3 * 4
mov [ eax ], ecx
sub ecx , 3 * 4
mov edx , ed_pos
movzx ebx , word ed_shift_pos
cmp edx , ebx
jle @ f
mov edx , ebx
2018-11-19 11:21:18 +01:00
@ @ :
2016-12-07 09:31:30 +01:00
; copy data
2020-05-14 21:14:14 +02:00
mov esi , ed_text
add esi , edx
push edi
mov edi , eax
add edi , 3 * 4
cld
rep movsb
pop edi
2016-12-07 09:31:30 +01:00
; put slot to the kernel clipboard
2020-05-14 21:14:14 +02:00
mov edx , eax
mov ecx ,[ edx ]
push eax
mcall SF_CLIPBOARD , SS F_WRITE_CB
pop ecx
2016-12-07 09:31:30 +01:00
; remove unnecessary memory area
2020-05-14 21:14:14 +02:00
mcall SF_SYS_MISC , SS F_MEM_FREE
2016-12-07 09:31:30 +01:00
.exit:
2020-05-14 21:14:14 +02:00
pop eax ; determine current action (ctrl+X or ctrl+C)
cmp eax , 'X'
je edi t_box_key.delete
jmp edi t_box.editbox_exit
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
edit_box_key.ctrl_v:
2020-05-14 21:14:14 +02:00
mcall SF_CLIPBOARD , SS F_GET_SLOT_COUNT
2016-12-07 09:31:30 +01:00
; no slots of clipboard ?
2020-05-14 21:14:14 +02:00
test eax , eax
jz .exit
2016-12-07 09:31:30 +01:00
; main list area not found ?
2020-05-14 21:14:14 +02:00
inc eax
test eax , eax
jz .exit
sub eax , 2
mov ecx , eax
mcall SF_CLIPBOARD , SS F_READ_CB
2016-12-07 09:31:30 +01:00
; main list area not found ?
2020-05-14 21:14:14 +02:00
inc eax
test eax , eax
jz .exit
2016-12-07 09:31:30 +01:00
; error ?
2020-05-14 21:14:14 +02:00
sub eax , 2
test eax , eax
jz .exit
inc eax
2016-12-07 09:31:30 +01:00
; check contents of container
2020-05-14 21:14:14 +02:00
mov ebx ,[ eax + 4 ]
2016-12-07 09:31:30 +01:00
; check for text
2020-05-14 21:14:14 +02:00
test ebx , ebx
jnz .no_valid_text
mov ebx ,[ eax + 8 ]
2016-12-07 09:31:30 +01:00
; check for cp866
2020-05-14 21:14:14 +02:00
cmp bl , 1
jnz .no_valid_text
2018-11-19 11:21:18 +01:00
; if something selected then need to delete it
2020-05-14 21:14:14 +02:00
test word ed_flags , ed_shift_on
jz .selected_done
push eax ; dummy parameter ; need to
push dword .selected_done ; correctly return
pushad ; from edit_box_key.delete
jmp edi t_box_key.delete
2018-11-19 11:21:18 +01:00
.selected_done:
2020-05-14 21:14:14 +02:00
mov ecx ,[ eax ]
sub ecx , 3 * 4
push ecx
2018-11-19 11:21:18 +01:00
; in ecx size of string to insert
2020-05-14 21:14:14 +02:00
add ecx , ed_size
mov edx , ed_max
cmp ecx , edx
jb @ f
mov ecx , edx
2016-12-07 09:31:30 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
mov esi , eax
add esi , 3 * 4
push eax edi
2018-11-19 11:21:18 +01:00
;---------------------------------------;
2020-05-14 21:14:14 +02:00
mov ed_size , ecx
2018-11-19 11:21:18 +01:00
2020-05-14 21:14:14 +02:00
push dword ed_text ; Dst
push esi ; Src
push dword ed_pos ; Pos in Dst
push dword ed_max ; DstMax
call StrInsert
2018-11-19 11:21:18 +01:00
;---------------------------------------;
2017-09-08 10:27:34 +02:00
; mov edi,ed_text
; cld
;@@:
; lodsb
; cmp al,0x0d ; EOS (end of string)
; je .replace
; cmp al,0x0a ; EOS (end of string)
; jne .continue
;.replace:
; mov al,0x20 ; space
;.continue:
; stosb
; dec ecx
; jnz @b
2020-05-14 21:14:14 +02:00
pop edi eax
;move cursor to the end of the inserted string
pop ecx
add ecx , ed_pos
cmp ecx , ed_max
jbe @ f
mov ecx , ed_max
2020-05-09 19:27:59 +02:00
@ @ :
mov ed_pos , ecx
2016-12-07 09:31:30 +01:00
.no_valid_text:
; remove unnecessary memory area
2020-05-14 21:14:14 +02:00
mov ecx , eax
mcall SF_SYS_MISC , SS F_MEM_FREE
2016-12-07 09:31:30 +01:00
.exit:
2020-05-14 21:14:14 +02:00
jmp edi t_box.draw_bg_cursor_text
2016-11-05 05:15:05 +01:00
2018-11-19 11:21:18 +01:00
edit_box_key.ctrl_a:
2020-05-14 21:14:14 +02:00
mov eax , ed_size
mov ed_pos , eax
xor eax , eax
mov ed_shift_pos , eax
or word ed_flags , ed_shift_bac + ed_shift_on
jmp edi t_box.draw_bg_cursor_text
2018-11-19 11:21:18 +01:00
2016-12-07 09:31:30 +01:00
;==========================================================
;=== <20> <> ࠡ<EFBFBD> ⪠ <20> <> <EFBFBD> <EFBFBD> =======================================
;==========================================================
;save for stdcall ebx,esi,edi,ebp
align 16
edit_box_mouse:
2020-05-14 21:14:14 +02:00
pushad
mov edi ,[ esp + 36 ]
test word ed_flags , ed_disabled
jnz edi t_box.editbox_exit
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
;----------------------------------------------------------
;--- <20> <> <EFBFBD> <EFBFBD> 砥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ﭨ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> -----------------------
;----------------------------------------------------------
2020-05-14 21:14:14 +02:00
mcall SF_MOUSE_GET , SS F_BUTTON
2016-12-07 09:31:30 +01:00
;----------------------------------------------------------
;--- <20> <EFBFBD> <E0AEA2> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ﭨ<EFBFBD> ----------------------------------
;----------------------------------------------------------
2020-05-14 21:14:14 +02:00
test eax , 1
jnz edi t_box_mouse.mouse_left_button
and word ed_flags , ed_mouse_on_off
mov ebx , ed_mouse_variable
push 0
pop dword [ ebx ]
jmp edi t_box.editbox_exit
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
.mouse_left_button:
;----------------------------------------------------------
;--- <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <20> <> 䮪<> <E4AEAA> <EFBFBD> <EFBFBD> <E0AEA2> <20> <20> <> 㣨<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;----------------------------------------------------------
2020-05-14 21:14:14 +02:00
mov eax , ed_mouse_variable
push dword [ eax ]
pop eax
test eax , eax
jz @ f
cmp eax , edi
je @ f
jmp edi t_box_mouse._blur
2016-12-07 09:31:30 +01:00
;----------------------------------------------------------
;--- <20> <> <EFBFBD> <EFBFBD> 砥<EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> ⭮<EFBFBD> <E2ADAE> ⥫쭮 0 <20> .<2E> <20> ᥩ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ࠭<EFBFBD>
;----------------------------------------------------------
@ @ :
2020-05-14 21:14:14 +02:00
mcall SF_MOUSE_GET , SS F_WINDOW_POSITION
2016-12-07 09:31:30 +01:00
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> ࠡ<EFBFBD> ⪨ <20> <> 誨 <20> <> <EFBFBD> <EFBFBD> 祭<EFBFBD> <E7A5AD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <20> <20> <EFBFBD> ઠ <20> <> + <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; <20> <> 㤥ন<E3A4A5> <E0A6A8> <EFBFBD> <EFBFBD> <20> <> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 誨, <20> <> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ?
2020-05-14 21:14:14 +02:00
test word ed_flags , ed_mouse_on
jne edi t_box_mouse.mouse_wigwag
2016-12-07 09:31:30 +01:00
; <20> <EFBFBD> <E0AEA2> 塞, <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> edit box
2020-05-14 21:14:14 +02:00
mov ebx , ed_top
cmp ax , bx
jl edi t_box_mouse._blur
add ebx , ed_height
cmp ax , bx
jg edi t_box_mouse._blur
shr eax , 16
mov ebx , ed_left
cmp ax , bx
jl edi t_box_mouse._blur
add ebx , ed_width
cmp ax , bx
jg edi t_box_mouse._blur
2016-12-07 09:31:30 +01:00
; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2020-05-14 21:14:14 +02:00
push eax
mov ebp , ed_color
call edi t_box.clear_cursor
pop eax
2016-12-07 09:31:30 +01:00
edit_box_mouse._mvpos:
2020-05-14 21:14:14 +02:00
xor edx , edx
sub eax , ed_left
div word ed_char_width
add eax , ed_offset
cmp eax , ed_size
jna edi t_box_mouse._mshift
mov eax , ed_size
2016-12-07 09:31:30 +01:00
edit_box_mouse._mshift:
; ᥪ<> <E1A5AA> <EFBFBD> <20> <> ࠡ<EFBFBD> ⪨ shift <20> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> shift
2020-05-14 21:14:14 +02:00
test word ed_flags , ed_shift_bac
je @ f
mov ebp , ed_color
movzx ebx , word ed_shift_pos
push eax
call edi t_box_key.sh_cl_
and word ed_flags , ed_shift_bac_cl
pop eax
2016-12-07 09:31:30 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
test word ed_flags , ed_mouse_on
jne @ f
mov ed_shift_pos , ax
or word ed_flags , ed_mouse_on
mov ed_pos , eax
mov ebx , ed_mouse_variable
push edi
pop dword [ ebx ]
bts word ed_flags , 1
call edi t_box.draw_bg
jmp edi t_box_mouse.m_sh
@ @ : cmp ax , ed_shift_pos
je edi t_box.editbox_exit
mov ed_pos , eax
call edi t_box.draw_bg
mov ebp , shift_color
movzx ebx , word ed_shift_pos
call edi t_box_key.sh_cl_
or word ed_flags , ed_mous_adn_b
2016-12-07 09:31:30 +01:00
edit_box_mouse.m_sh:
2020-05-14 21:14:14 +02:00
call edi t_box.draw_text
call edi t_box.draw_cursor
2016-12-07 09:31:30 +01:00
; <20> <> <EFBFBD> 楤<EFBFBD> <E6A5A4> <EFBFBD> <20> <> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> 䮪<> <E4AEAA> <EFBFBD>
2020-05-14 21:14:14 +02:00
jmp edi t_box_mouse.drc
2020-05-09 22:59:51 +02:00
edit_box_mouse._remove_selection:
2020-05-14 21:14:14 +02:00
and word ed_flags , ed_shift_cl
jmp edi t_box.draw_bg_cursor_text
2009-02-13 10:04:33 +01:00
2016-12-07 09:31:30 +01:00
edit_box_mouse._blur:
2020-05-14 21:14:14 +02:00
test word ed_flags , ed_always_focus
jne edi t_box_mouse._remove_selection
btr word ed_flags , bsf ed_focus ;if focused then remove focus, otherwise exit
jnc edi t_box_mouse._remove_selection
mov ebp , ed_color
call edi t_box.clear_cursor
2016-12-07 09:31:30 +01:00
edit_box_mouse.drc:
2020-05-14 21:14:14 +02:00
call edi t_box.draw_border
jmp edi t_box_mouse._remove_selection
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;<3B> <> 騥 <20> 㭪樨 <20> <> ࠡ<EFBFBD> ⪨
;----------------------------------------------------------
;--- <20> <> <EFBFBD> 楤<EFBFBD> <E6A5A4> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ᮢ<EFBFBD> <E1AEA2> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ----------------
;----------------------------------------------------------
edit_box.draw_shift:
2020-05-14 21:14:14 +02:00
test word ed_flags , ed_shift_bac ;<3B> <> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> 䫠<> <E4ABA0> , <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
jz @ f
mov ebp , shift_color
movzx ebx , word ed_shift_pos
call edi t_box_key.sh_cl_
@ @ : ret
2016-12-07 09:31:30 +01:00
;----------------------------------------------------------
;--- <20> <> <EFBFBD> 楤<EFBFBD> <E6A5A4> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ᮢ<EFBFBD> <E1AEA2> ⥪<> <E2A5AA> <EFBFBD> --------------------------
;----------------------------------------------------------
edit_box.draw_text:
2020-05-14 21:14:14 +02:00
call edi t_box.get_n
mov esi , ed_size
sub esi , ed_offset
cmp eax , esi
jae @ f
mov esi , eax
2016-12-07 09:31:30 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
test esi , esi
jz @ f
mov eax , SF_DRAW_TEXT
mov ebx , ed_left
add ebx , 2
shl ebx , 16
add ebx , ed_top
add ebx , 3
mov ecx , ed_text_color
test dword ed_flags , ed_pass
jnz .password
mov edx , ed_text
add edx , ed_offset
mcall
2016-11-05 05:15:05 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
ret
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
.password:
2020-05-14 21:14:14 +02:00
mov ebp , esi
mov esi , 1
mov edx , txt_pass
2016-12-07 09:31:30 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
mcall
rol ebx , 16
add ebx , ed_char_width
rol ebx , 16
dec ebp
jnz @ b
ret
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
txt_pass db '*'
;----------------------------------------------------------
;--- <20> <> <EFBFBD> 楤<EFBFBD> <E6A5A4> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ᮢ<EFBFBD> <E1AEA2> 䮭<> ----------------------------
;----------------------------------------------------------
edit_box.draw_bg:
2020-05-14 21:14:14 +02:00
mov ebx , ed_left
inc ebx
shl ebx , 16
add ebx , ed_width
dec ebx
mov edx , ed_color
test word ed_flags , ed_disabled
jz edi t_box.draw_bg_eax
mov edx , 0xCACACA ; TODO: add disabled_color field to editbox struct
2016-12-07 09:31:30 +01:00
edit_box.draw_bg_eax:
2020-05-14 21:14:14 +02:00
mov ecx , ed_top
inc ecx
shl ecx , 16
add ecx , ed_height
mcall SF_DRAW_RECT
ret
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
;----------------------------------------------------------
;--- <20> <> <EFBFBD> 楤<EFBFBD> <E6A5A4> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 祭<EFBFBD> <E7A5AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢠ ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD> <EFBFBD> <20> ⥪<> 饩 <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;----------------------------------------------------------
edit_box.get_n:
2020-05-14 21:14:14 +02:00
mov eax , ed_width
sub eax , 4
xor edx , edx
div word ed_char_width
ret
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
;----------------------------------------------------------
;------------------ Draw Cursor Procedure -----------------
;----------------------------------------------------------
; in: ebp = Color
edit_box.clear_cursor:
2020-05-14 21:14:14 +02:00
movzx ebx , word cl _curs_x
cmp ebx , ed_left ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<> ⮢<EFBFBD> <E2AEA2> <20> <> <EFBFBD> <EFBFBD> ?
jle @ f
mov edx , ebp
movzx ecx , word cl _curs_y
cmp ecx , ed_top
jg edi t_box.draw_curs
2017-12-10 18:34:39 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
ret
2009-02-13 10:04:33 +01:00
2016-12-07 09:31:30 +01:00
edit_box.draw_cursor:
2020-05-14 21:14:14 +02:00
mov edx , ed_text_color
mov eax , ed_pos
sub eax , ed_offset
mul dword ed_char_width
mov ebx , eax
add ebx , ed_left
inc ebx
mov ecx , ed_top
add ecx , 2
mov cl _curs_x , bx
mov cl _curs_y , cx
2017-12-10 18:34:39 +01:00
edit_box.draw_curs:
2020-05-14 21:14:14 +02:00
mov eax , ebx
shl ebx , 16
or ebx , eax
mov eax , ecx
shl ecx , 16
or ecx , eax
add ecx , ed_height
sub ecx , 3
mcall SF_DRAW_LINE
ret
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
;----------------------------------------------------------
;--- <20> <> <EFBFBD> 楤<EFBFBD> <E6A5A4> <EFBFBD> <20> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> ࠬ<> <E0A0AC> ----------------------------
;----------------------------------------------------------
edit_box.draw_border:
2020-05-14 21:14:14 +02:00
test word ed_flags , ed_focus
mov edx , ed_focus_border_color
jne @ f
mov edx , ed_blur_border_color
2016-11-05 05:15:05 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
;mov edx,$808080
mov ebx , ed_left
mov eax , ebx
shl ebx , 16
add ebx , eax
;add ebx,ed_width
mov ecx , ed_top
mov eax , ecx
shl ecx , 16
add ecx , eax
push ecx
inc ecx
add ecx , ed_height
mcall SF_DRAW_LINE ; left
xchg ecx ,[ esp ]
add ebx , ed_width
mcall ; top
;or edx,-1
pop ecx
push cx
push cx
push ebx
push bx
push bx
pop ebx
mcall ; right
pop ebx
pop ecx
mcall ; bottom
ret
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
;----------------------------------------------------------
;--- <20> <EFBFBD> ઠ, <20> <> 襫 <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> ࠭<EFBFBD> <E0A0AD> <EFBFBD> <20> , <20> <20> <> <EFBFBD> <EFBFBD> , ---
;--- <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 塞 ᬥ饭<E1ACA5> <E9A5AD> ------------------------------------
;--- <20> ᬥ饭<E1ACA5> <E9A5AD> <20> 뫮, <20> <> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> 䫠<> <E4ABA0> ed_offset_cl, <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ,
; <20> <20> <> 祣<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <20> <> <EFBFBD> ⠢<EFBFBD> <E2A0A2> <EFBFBD> <EFBFBD> <EFBFBD> ed_offset_fl
; <20> <20> <> 饩 <20> <> ⮢<EFBFBD> <E2AEA2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ﭨ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⮢ word ed_flags
;----------------------------------------------------------
edit_box.check_offset:
2020-05-14 21:14:14 +02:00
pushad
mov ecx , ed_pos
mov ebx , ed_offset
cmp ebx , ecx
ja edi t_box.sub_8
push ebx
call edi t_box.get_n
pop ebx
mov edx , ebx
add edx , eax
inc edx ;<3B> <> <EFBFBD> <EFBFBD> 室<EFBFBD> <E5AEA4> <EFBFBD> <20> <> <EFBFBD> <20> <> ଠ <EFBFBD> 쭮<EFBFBD> <ECADAE> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> ࠩ<EFBFBD> <E0A0A9> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 樨
cmp edx , ecx
ja @ f
mov edx , ed_size
cmp edx , ecx
je edi t_box.add_end
sub edx , ecx
cmp edx , 8
jbe edi t_box.add_8
add ebx , 8
jmp edi t_box.chk_d
@ @ : or word ed_flags , ed_offset_fl
popad
ret
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
edit_box.sub_8:
2020-05-14 21:14:14 +02:00
test ecx , ecx
jz @ f
sub ebx , 8 ;ebx=ed_offset
ja edi t_box.chk_d
2016-11-05 05:15:05 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
xor ebx , ebx
jmp edi t_box.chk_d
2016-12-07 09:31:30 +01:00
edit_box.add_end:
2020-05-14 21:14:14 +02:00
sub edx , eax
mov ebx , edx
jmp edi t_box.chk_d
2016-12-07 09:31:30 +01:00
edit_box.add_8:
2020-05-14 21:14:14 +02:00
add ebx , edx
2016-12-07 09:31:30 +01:00
edit_box.chk_d:
2020-05-14 21:14:14 +02:00
mov ed_offset , ebx
call edi t_box.draw_bg
and word ed_flags , ed_offset_cl
popad
ret
2009-02-13 10:04:33 +01:00
2016-12-07 09:31:30 +01:00
align 4
proc edi t_box_set_text , edi t : dword , text : dword
2020-05-14 21:14:14 +02:00
pushad
mov edi ,[ edi t ]
mov ecx , ed_max
inc ecx
mov edi ,[ text ]
xor al , al
cld
repne scasb
mov ecx , edi
mov edi ,[ edi t ]
mov esi ,[ text ]
sub ecx , esi
dec ecx
mov ed_size , ecx
mov ed_pos , ecx
and word ed_flags , ed_shift_cl
mov edi , ed_text
repne movsb
mov byte [ edi ], 0
popad
ret
2016-12-07 09:31:30 +01:00
endp
2009-02-13 10:04:33 +01:00
2016-12-07 09:31:30 +01:00
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;<3B> 㭪樨 <20> <> <EFBFBD> ࠡ<> <E0A0A1> <EFBFBD> <20> key
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
;<3B> <> ࠡ<EFBFBD> ⪠ Shift <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⭮<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
edit_box_key.shift:
2020-05-14 21:14:14 +02:00
call edi t_box.draw_bg
test word ed_flags , ed_shift
je edi t_box_key.f_exit
mov ebp , shift_color
or word ed_flags , ed_shift_bac ;<3B> <> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> 䫠<> <E4ABA0> , <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
movzx ebx , word ed_shift_pos
call edi t_box_key.sh_cl_
jmp edi t_box.draw_cursor_text
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
edit_box_key.f_exit:
2020-05-14 21:14:14 +02:00
call edi t_box.check_offset
and word ed_flags , ed_shift_cl
call edi t_box_key.enable_null
jmp edi t_box.draw_cursor_text
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
edit_box_key.sh_cl_:
;<3B> <> ࠡ<EFBFBD> ⪠ <20> <> <EFBFBD> <EFBFBD> ⪨, <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> - <20> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD>
;<3B> <> <EFBFBD> <20> <> ࠡ<EFBFBD> ⪨ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD>
;<3B> 室<EFBFBD> <E5AEA4> <EFBFBD> <20> <> ࠬ<EFBFBD> <E0A0AC> <EFBFBD> <EFBFBD> ebp=color ebx=ed_shift_pos
2020-05-14 21:14:14 +02:00
mov eax , ed_pos
cmp eax , ebx
jae edi t_box_key.sh_n
push eax ;<3B> <> <EFBFBD> <EFBFBD> 襥 <20> eax
push ebx ;<3B> <> <EFBFBD> <EFBFBD> 襥
jmp edi t_box_key.sh_n1
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
edit_box_key.sh_n:
2020-05-14 21:14:14 +02:00
push ebx
push eax
2016-12-07 09:31:30 +01:00
edit_box_key.sh_n1:
2020-05-14 21:14:14 +02:00
call edi t_box.check_offset
call edi t_box.get_n
mov edx , eax ;size of ed_box
mov ecx , ed_offset
add eax , ecx ;eax = w_off= ed_offset+width
mov edx , eax ;save
pop ebx ;<3B> <> <EFBFBD> <EFBFBD> 襥
pop eax ;<3B> <> <EFBFBD> <EFBFBD> 襥
cmp eax , ecx ;<3B> ࠢ<EFBFBD> <E0A0A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 襣<EFBFBD> <20> offset.
jae edi t_box_key.f_f ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
xor eax , eax
cmp edx , ebx ;cࠢ<63> <E0A0A2> <EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> w_off <20> <20> <> <EFBFBD> <EFBFBD> 訬
jnb @ f
mov ebx , edx
2016-12-07 09:31:30 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
sub ebx , ecx
jmp edi t_box_key.nxt_f
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
edit_box_key.f_f:
2020-05-14 21:14:14 +02:00
sub eax , ecx
cmp edx , ebx ;cࠢ<63> <E0A0A2> <EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> w_off <20> <20> <> <EFBFBD> <EFBFBD> 訬
jle @ f
sub ebx , ecx
sub ebx , eax
jmp edi t_box_key.nxt_f
@ @ : mov ebx , edx
sub ebx , ecx
sub ebx , eax
2016-12-07 09:31:30 +01:00
edit_box_key.nxt_f:
2020-05-14 21:14:14 +02:00
mul dword ed_char_width
xchg eax , ebx
mul dword ed_char_width
add ebx , ed_left
inc ebx
shl ebx , 16
inc eax
mov bx , ax
mov edx , ebp ;shift_color
call edi t_box.draw_bg_eax
jmp edi t_box_key.enable_null
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
;<3B> <> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> - <20> <> <EFBFBD> ⨥ <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD>
edit_box_key.drw_sim:
2020-05-14 21:14:14 +02:00
mov eax , ed_pos
call edi t_box_key.draw_rectangle
jmp edi t_box_key.enable_null
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> ࠢ<EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> ⨨ shift
edit_box_key.draw_wigwag:
2020-05-14 21:14:14 +02:00
mov ebp , shift_color
call edi t_box.clear_cursor
or word ed_flags , ed_shift_bac ;<3B> <> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> 䫠<> <E4ABA0> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ebp , shift_color
mov eax , ed_pos
test word ed_flags , ed_left_fl
jnz edi t_box_key.draw_rectangle
dec eax
jmp edi t_box_key.draw_rectangle
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> 㤠<> <E3A4A0> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> ࠢ<EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> ⨨ shift
edit_box_key.draw_wigwag_cl:
2020-05-14 21:14:14 +02:00
mov ebp , ed_color
call edi t_box.clear_cursor
mov ebp , ed_color
mov eax , ed_pos
test word ed_flags , ed_left_fl
jnz edi t_box_key.draw_rectangle
dec eax
jmp edi t_box_key.draw_rectangle
2009-02-13 10:04:33 +01:00
2016-12-07 09:31:30 +01:00
;<3B> 室<EFBFBD> <E5AEA4> <EFBFBD> <20> <> ࠬ<EFBFBD> <E0A0AC> <EFBFBD> ebx - ed_pos
edit_box_key.sh_first_sh:
2020-05-14 21:14:14 +02:00
test word ed_flags , ed_shift
je @ f
mov ed_shift_pos_old , bx
test word ed_flags , ed_shift_on
jne @ f
mov ed_shift_pos , bx
or word ed_flags , ed_shift_on
@ @ : ret
2016-12-07 09:31:30 +01:00
;<3B> <> ࠡ<EFBFBD> ⪠ <20> ࠩ<EFBFBD> <E0A0A9> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> editbox <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⮬ shift
;<3B> ந<EFBFBD> <E0AEA8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⨥ <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <20> <> <EFBFBD> shift
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 室<EFBFBD> <E5AEA4>
edit_box_key.sh_st_of:
2020-05-14 21:14:14 +02:00
test word ed_flags , ed_shift
jne @ f
test word ed_flags , ed_shift_bac
je @ f
call edi t_box.draw_bg
mov ebp , ed_color
movzx ebx , word ed_shift_pos
call edi t_box_key.sh_cl_ ;<3B> <> <EFBFBD> <EFBFBD> ⪠ <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ࠣ<EFBFBD> <E0A0A3> <EFBFBD> <EFBFBD> <EFBFBD>
and word ed_flags , ed_shift_cl ; <20> <> <EFBFBD> <EFBFBD> ⪠ <20> <> ⮣<> , <20> <> <EFBFBD> <20> <> ࠫ<EFBFBD> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD>
jmp edi t_box.draw_cursor_text
@ @ : and word ed_flags , ed_shift_off
popad
ret 4
2016-12-07 09:31:30 +01:00
;<3B> <EFBFBD> ઠ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ﭨ<EFBFBD> shift, <20> <> <EFBFBD> <20> <> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ࠭<> <E0A0AD> <EFBFBD> ?
edit_box_key.sh_enable:
2020-05-14 21:14:14 +02:00
test word ed_flags , ed_shift
jne edi t_box_key.sh_ext_en ;<3B> <> <EFBFBD> <EFBFBD> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 襭<EFBFBD> <E8A5AD> <EFBFBD> <20> <> אַ㣮<EFACAE> 쭨<EFBFBD>
test word ed_flags , ed_shift_bac
je @ f
call edi t_box.check_offset
mov ebp , ed_color
movzx ebx , word ed_shift_pos
call edi t_box_key.sh_cl_ ;<3B> <> <EFBFBD> <EFBFBD> ⪠ <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ࠣ<EFBFBD> <E0A0A3> <EFBFBD> <EFBFBD> <EFBFBD>
call edi t_box_key.draw_wigwag_cl
and word ed_flags , ed_shift_cl ; 1<> <31> <EFBFBD> <20> <> <20> 㦭<EFBFBD>
ret
@ @ : mov ebp , ed_color
call edi t_box.clear_cursor
jmp edi t_box.check_offset
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
edit_box_key.sh_ext_en:
2020-05-14 21:14:14 +02:00
call edi t_box.check_offset
test word ed_flags , ed_offset_fl
je @ f
2016-12-07 09:31:30 +01:00
;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 襭<EFBFBD> <E8A5AD> <EFBFBD> <20> <> אַ㣮<EFACAE> 쭨<EFBFBD> <ECADA8> <EFBFBD> <20> <20> <> <20> <> <EFBFBD> <EFBFBD> ⪠
2020-05-14 21:14:14 +02:00
movzx eax , word ed_shift_pos
mov ebx , ed_pos
movzx ecx , word ed_shift_pos_old
2016-12-07 09:31:30 +01:00
;<3B> <EFBFBD> ઠ <20> <20> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 襭<EFBFBD> <E8A5AD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ⥩
2020-05-14 21:14:14 +02:00
cmp eax , ecx
je edi t_box_key.1_shem
jb edi t_box_key.smaller
cmp ecx , ebx
ja edi t_box_key.1_shem
call edi t_box_key.draw_wigwag_cl ;clear
jmp edi t_box_key.sh_e_end
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
edit_box_key.smaller:
2020-05-14 21:14:14 +02:00
cmp ecx , ebx
jb edi t_box_key.1_shem
call edi t_box_key.draw_wigwag_cl ;clear
jmp edi t_box_key.sh_e_end
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
edit_box_key.1_shem:
2020-05-14 21:14:14 +02:00
call edi t_box_key.draw_wigwag
2016-12-07 09:31:30 +01:00
edit_box_key.sh_e_end:
2020-05-14 21:14:14 +02:00
and word ed_flags , ed_shift_off
ret
2016-12-07 09:31:30 +01:00
2020-05-14 21:14:14 +02:00
@ @ : mov ebp , shift_color
movzx ebx , word ed_shift_pos
call edi t_box_key.sh_cl_
jmp edi t_box_key.sh_e_end
2016-12-07 09:31:30 +01:00
;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <20> <> ࠡ<EFBFBD> ⪨ shift <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⨨ home and end
edit_box_key.sh_home_end:
2020-05-14 21:14:14 +02:00
mov ebp , ed_color
call edi t_box.clear_cursor
test word ed_flags , ed_shift_bac
je @ f
mov ebp , ed_color
movzx ebx , word ed_shift_pos_old
call edi t_box_key.sh_cl_
2016-12-07 09:31:30 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
test word ed_flags , ed_shift
je edi t_box_key.sh_exit_ ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD>
mov ebp , shift_color
movzx ebx , word ed_shift_pos
call edi t_box_key.sh_cl_
or word ed_flags , ed_shift_bac ;<3B> <> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> 䫠<> <E4ABA0> , <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
jmp edi t_box_key.sh_e_end
2016-12-07 09:31:30 +01:00
edit_box_key.sh_exit_:
2020-05-14 21:14:14 +02:00
call edi t_box.draw_bg
jmp edi t_box.check_offset
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> ᥭ<EFBFBD> <E1A5AD> 0 <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ed_size+1
edit_box_key.enable_null:
2020-05-14 21:14:14 +02:00
pusha
mov eax , ed_size
mov ebx , ed_text
test eax , eax
add eax , ebx
jne @ f
inc eax
@ @ : xor ebx , ebx
mov [ eax ], bl
popad
ret
2016-11-05 05:15:05 +01:00
2016-12-07 09:31:30 +01:00
;- 㤠<> <E3A4A0> <EFBFBD> <EFBFBD> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD>
;<3B> 室<EFBFBD> <E5AEA4> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> edx=ed_size;ecx=ed_pos
edit_box_key.del_char:
2020-05-14 21:14:14 +02:00
mov esi , ed_text
test word ed_flags , ed_shift_on
je @ f
movzx eax , word ed_shift_pos
mov ebx , esi
cmp eax , ecx
jae edi t_box_key.dh_n
mov ed_pos , eax ;<3B> ⮡<EFBFBD> <20> <> <20> 뫮 㡥<> <E3A1A5> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ebp , ecx
sub ebp , eax
add ebx , eax ;eax <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
sub edx , ecx
add esi , ecx
mov ed_shift_pos , bp
jmp edi t_box_key.del_ch_sh
2016-12-07 09:31:30 +01:00
edit_box_key.dh_n:
2020-05-14 21:14:14 +02:00
mov ebp , eax
sub ebp , ecx
add ebx , ecx
sub edx , eax
add esi , eax
mov ed_shift_pos , bp
jmp edi t_box_key.del_ch_sh
@ @ : add esi , ecx ;㪠<> <E3AAA0> ⥫<EFBFBD> + ᬥ饭<E1ACA5> <E9A5AD> <20> ॠ<> 쭮<EFBFBD> <ECADAE> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ebx , esi
inc esi
cld
sub edx , ecx
2016-12-07 09:31:30 +01:00
edit_box_key.del_ch_sh:
2020-05-14 21:14:14 +02:00
push edi
mov edi , ebx
2016-12-07 09:31:30 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
lodsb
stosb
dec edx
jns @ b
pop edi
ret
2016-12-07 09:31:30 +01:00
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <E1ABA8> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 訢<EFBFBD> <E8A8A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;ᮣ<> <E1AEA3> 襭<EFBFBD> <E8A5AD> <20> ebp - <20> <> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> ed_size
edit_box_key.clear_bg:
2020-05-14 21:14:14 +02:00
call edi t_box.get_n ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> <20> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
push eax
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
sub ebx , eax
mov ecx , ed_offset
sub eax , ecx
jmp edi t_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
2016-12-07 09:31:30 +01:00
edit_box_key.nxt:
2020-05-14 21:14:14 +02:00
mov ebp , eax ;<3B> <EFBFBD> ઠ <20> <> <20> <> 室 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 訢<EFBFBD> <E8A8A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> ।<EFBFBD> <E0A5A4> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
add ebp , ebx
pop edx
cmp ebp , edx
je @ f
inc ebx
2016-12-07 09:31:30 +01:00
@ @ :
2020-05-14 21:14:14 +02:00
mul dword ed_char_width
xchg eax , ebx
mul dword ed_char_width
add ebx , ed_left
inc ebx
shl ebx , 16
inc eax
mov bx , ax
mov edx , ed_color
jmp edi t_box.draw_bg_eax
2016-12-07 09:31:30 +01:00
;;;;;;;;;;;;;;;;;;;
;;; <20> <> ࠡ<EFBFBD> ⪠ <20> ਬ<EFBFBD> ⨢<EFBFBD> <E2A8A2>
;;;;;;;;;;;;;;;;;;;;
;<3B> <> <EFBFBD> <EFBFBD> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <20> <> אַ㣮<EFACAE> 쭨<EFBFBD> , 梥<> <20> <> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <20> ebp
;<3B> 室<EFBFBD> <E5AEA4> <EFBFBD> <20> <> ࠬ<EFBFBD> <E0A0AC> <EFBFBD> <EFBFBD> :
;eax=dword ed_pos
;ebp=-梥<> ed_color or shift_color
edit_box_key.draw_rectangle:
2020-05-14 21:14:14 +02:00
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
jmp edi t_box.draw_bg_eax
2009-02-13 10:04:33 +01:00
2016-12-07 09:31:30 +01:00
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;<3B> 㭪樨 <20> <> <EFBFBD> ࠡ<> <E0A0A1> <EFBFBD> <20> mouse
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2009-02-13 10:04:33 +01:00
edit_box_mouse.mouse_wigwag:
2020-05-14 21:14:14 +02:00
push eax
call edi t_box.draw_bg
call edi t_box.draw_shift
pop eax
or word ed_flags , ed_shift_bac + ed_shift_on + ed_shift
2016-11-05 05:15:05 +01:00
;<3B> <> ࠡ<EFBFBD> ⪠ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<> <E2A5AA> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> ந<EFBFBD> 室<EFBFBD> <E5AEA4> <20> <> 室 <20> <> <20> ।<EFBFBD> <E0A5A4> <EFBFBD> editbox
2020-05-14 21:14:14 +02:00
test eax , eax
js edi t_box_mouse.mleft
shr eax , 16
sub eax , ed_left
jc edi t_box_mouse.mleft
cmp ed_width , eax
jc edi t_box_mouse.mright
xor edx , edx
div word ed_char_width
2016-11-05 05:15:05 +01:00
;<3B> <> ࠡ<EFBFBD> ⪠ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<> <E2A5AA> <EFBFBD> , <20> <20> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> editbox
2009-02-13 10:04:33 +01:00
;<3B> <> <EFBFBD> <EFBFBD> 稫<EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> eax <20> <> 誨, <20> .<2E> . <20> 㤠 <20> <> <EFBFBD> <20> <> ६<EFBFBD> <E0A5AC> ⨫<EFBFBD> <E2A8AB> <EFBFBD>
2011-02-09 02:01:22 +01:00
;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 襭<EFBFBD> <E8A5AD> <EFBFBD> <20> <> אַ㣮<EFACAE> 쭨<EFBFBD> <ECADA8> <EFBFBD> <20> <20> <> <20> <> <EFBFBD> <EFBFBD> ⪠
2020-05-14 21:14:14 +02:00
add eax , ed_offset
cmp eax , ed_size
ja edi t_box_mouse.mwigvag
2011-02-09 02:01:22 +01:00
edit_box_mouse.mdraw:
2020-05-14 21:14:14 +02:00
mov ed_pos , eax
2011-02-09 02:01:22 +01:00
;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 襭<EFBFBD> <E8A5AD> <EFBFBD> <20> <> אַ㣮<EFACAE> 쭨<EFBFBD> <ECADA8> <EFBFBD> <20> <20> <> <20> <> <EFBFBD> <EFBFBD> ⪠
2020-05-14 21:14:14 +02:00
movzx ecx , word ed_shift_pos
movzx ebx , word ed_shift_pos_old
mov ed_shift_pos_old , ax
2011-02-09 02:01:22 +01:00
;<3B> <EFBFBD> ઠ <20> <20> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 襭<EFBFBD> <E8A5AD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ⥩
2020-05-14 21:14:14 +02:00
cmp ecx , ebx
je edi t_box_mouse.m1_shem ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> 뫮 ࠭<> <E0A0AD>
jb edi t_box_mouse.msmaller ;<3B> 뫮 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ->
cmp ebx , eax
ja edi t_box_mouse.m1_shem ;<3B> 뫮 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <-
je edi t_box_mouse.mwigvag
mov ebp , ed_color
call edi t_box_key.sh_cl_ ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> c ed_pos ed_shift_pos_old
jmp edi t_box_mouse.mwigvag
2016-11-05 05:15:05 +01:00
2009-02-13 10:04:33 +01:00
edit_box_mouse.msmaller:
2020-05-14 21:14:14 +02:00
cmp ebx , eax
jb edi t_box_mouse.m1_shem
mov ebp , ed_color
call edi t_box_key.sh_cl_
jmp edi t_box_mouse.mwigvag
2016-11-05 05:15:05 +01:00
2011-02-09 02:01:22 +01:00
edit_box_mouse.m1_shem:
2020-05-14 21:14:14 +02:00
mov ebp , shift_color
mov ebx , ecx
call edi t_box_key.sh_cl_
2009-02-13 10:04:33 +01:00
edit_box_mouse.mwigvag:
2020-05-14 21:14:14 +02:00
and word ed_flags , ed_shift_mcl
jmp edi t_box.draw_cursor_text
2016-11-05 05:15:05 +01:00
2009-02-13 10:04:33 +01:00
edit_box_mouse.mleft:
2020-05-14 21:14:14 +02:00
mov eax , ed_pos
cmp eax , 0
jbe edi t_box_mouse.mwigvag
dec eax
call edi t_box.check_offset
push eax
movzx ebx , word ed_shift_pos
mov ebp , shift_color
call edi t_box_key.sh_cl_
pop eax
jmp edi t_box_mouse.mdraw
2016-11-05 05:15:05 +01:00
2009-02-13 10:04:33 +01:00
edit_box_mouse.mright:
2020-05-14 21:14:14 +02:00
mov eax , ed_pos
mov ebx , ed_size
cmp eax , ebx
jae edi t_box_mouse.mwigvag
inc eax
call edi t_box.check_offset
movzx ebx , word ed_shift_pos
mov ebp , shift_color
push eax
call edi t_box_key.sh_cl_
pop eax
jmp edi t_box_mouse.mdraw
2016-11-05 05:15:05 +01:00
2009-02-13 10:04:33 +01:00
2016-11-05 05:15:05 +01:00
ed_struc_size = 84