kolibrios/programs/develop/box_lib/trunk/box_lib.asm

535 lines
22 KiB
NASM
Raw Normal View History

;Libray from Editbox
; SEE YOU File FAQ.txt and HISTORY. Good Like!
;;;;;;;;;;;;;;;;;;
format MS COFF
public EXPORTS
section '.flat' code readable align 16
include 'macros.inc'
include 'editbox.mac' ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> :) ᯥ樠<E1AFA5><20><><EFBFBD> editbox
edit_box:
ed_width equ [edi] ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_left equ [edi+4] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20>
ed_top equ [edi+8] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20>
ed_color equ [edi+12] ;梥<><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
shift_color equ [edi+16] ;=0x6a9480 <20><><EFBFBD> <20><EFBFBD><E0A8AC><EFBFBD> <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><> <20><><EFBFBD><EFBFBD><EFBFBD>
ed_focus_border_color equ [edi+20] ;梥<><><E0A0AC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_blur_border_color equ [edi+24] ;梥<> <20><> <20><><EFBFBD><E2A8A2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_text_color equ [edi+28] ;梥<><><E2A5AA><EFBFBD>
ed_max equ [edi+32] ;<3B><><EFBFBD>-<2D><><><E1A8AC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E1A8AC><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_text equ [edi+36] ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>
ed_flags equ [edi+40] ;䫠<><E4ABA0>
ed_size equ [edi+44] ;<3B><><EFBFBD>-<2D><><><E1A8AC><EFBFBD><EFBFBD><EFBFBD>
ed_pos equ [edi+48] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_offset equ [edi+52] ;ᬥ饭<E1ACA5><E9A5AD>
cl_curs_x equ [edi+56] ;<3B><EFBFBD><E0A5A4><EFBFBD><20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>
cl_curs_y equ [edi+60] ;<3B><EFBFBD><E0A5A4><EFBFBD><20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>
ed_shift_pos equ [edi+64] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_shift_pos_old equ [edi+68] ;<3B><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.draw:
pushad
;--- <20><><EFBFBD>㥬 ࠬ<><E0A0AC> ---
mov edi,dword [esp+36]
call .draw_border ; <20><EFBFBD><E3ADAA><EFBFBD> <20><EFBFBD><E2A0A1>
.draw_bg_cursor_text:
;--- <20><><EFBFBD><EFBFBD><EFBFBD>塞 ᬥ饭<E1ACA5><E9A5AD>, <20><20><><EFBFBD><EFBFBD> ---
call .check_offset ;<3B><><EFBFBD><EFBFBD><EFBFBD><E1ABA5><EFBFBD> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E2A0A1>
;--- <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><E0A5AD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ---
call .draw_bg ;<3B><><EFBFBD><EFBFBD><EFBFBD><E1AEA2><EFBFBD> <20><>אַ㣮<EFACAE><EFBFBD><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;---- <20><><EFBFBD><20><EFBFBD><EBA4A5><EFBFBD><EFBFBD><EFBFBD>, <20><> shift <20><20><><EFBFBD><EFBFBD>
call .draw_shift
.draw_cursor_text:
;--- <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ---
;--- <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD> ----
test word ed_flags,ed_focus
je @f
call .draw_cursor
@@:
call .draw_text
; ret
;;;;;;;;;;;;;;;;;;;;;;;;;;
;<3B><><20><><20><> editbox <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20>㭪権 <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><E0A0A1><EFBFBD><E7A8AA>
;;;;;;;;;;;;;;;;;;;;;;;;;;
.editbox_exit:
popad
ret 4
;==========================================================
;=== <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =================================
;==========================================================
edit_box_key:
pushad
mov edi,dword [esp+36]
test word ed_flags,ed_focus ; <20><20><> <20><><E4AEAA><EFBFBD>, <20><><EFBFBD><E5AEA4>
je edit_box.editbox_exit
test word ed_flags,ed_mouse_on
jne edit_box.editbox_exit
;<3B><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD> shift ?
call edit_box_key.check_shift
;----------------------------------------------------------
;--- <20><EFBFBD><E0AEA2>塞, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> --------------------------------
;----------------------------------------------------------
use_key_process backspase,delete,left,right,home,end,insert
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;<3B><><EFBFBD><EFBFBD><EFBFBD><20><> <20><><EFBFBD><E0A0A1><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20>.<2E>. <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E3A6A5><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><EFBFBD><E5AEA4> <20><><20><> <20><><EFBFBD><E0A0A1><EFBFBD>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
use_key_no_process up,down,esc
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ---
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;<3B><EFBFBD><20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> <20><><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><20><EFBFBD> <20><EFBFBD><EBA2AE><EFBFBD><EFBFBD> ⮫쪮 <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><EFBFBD><E3A6AD> <20><><EFBFBD><EFBFBD><EFBFBD> <20>᫨ ⠪<><E2A0AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E5AEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
use_key_figures_only
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;<3B><EFBFBD><20><> shift <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
are_key_shift_press
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; <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>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
are_key_cur_end
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;<3B><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> insert,delete.backspase,home,end,left,right
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
use_work_key
;==========================================================
;=== <20><><EFBFBD><20><><EFBFBD><EFBFBD> =======================================
;==========================================================
;save for stdcall ebx,esi,edi,ebp
edit_box_mouse:
pushad
mov edi,dword [esp+36]
;debug
;----------------------------------------------------------
;--- <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> -----------------------
;----------------------------------------------------------
mcall 37,2
;----------------------------------------------------------
;--- <20><EFBFBD><E0AEA2><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ----------------------------------
;----------------------------------------------------------
test eax,1
jnz edit_box_mouse.mouse_left_button
and word ed_flags,ed_mouse_on_off
xor ebx,ebx
mov dword [mouse_flag],ebx
jmp edit_box.editbox_exit
.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>
;----------------------------------------------------------
mov eax,dword [mouse_flag]
test eax,eax
jz @f
cmp eax,edi
je @f
jmp edit_box_mouse._blur
;----------------------------------------------------------
;--- <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>
;----------------------------------------------------------
@@: mcall 37,1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;<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>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
use_work_mouse
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;<3B><><20>㭪樨 <20><><EFBFBD>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
use_general_func
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;<3B>㭪樨 <20><><EFBFBD><><E0A0A1><EFBFBD> <20> key
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
use_key_func
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;<3B>㭪樨 <20><><EFBFBD><><E0A0A1><EFBFBD> <20> mouse
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
use_mouse_func
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Bit mask from editbox
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ed_figure_only= 1000000000000000b ;<3B><><EFBFBD><EFBFBD><><E1A8AC><EFBFBD><EFBFBD>
ed_always_focus= 100000000000000b
ed_focus= 10b ;䮪<><E4AEAA> <20><EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_shift_on= 1000b ;<3B><20><> <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> -<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> shift,<2C><20><><EFBFBD> <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><20><><EFBFBD> - <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㤥ন<E3A4A5><E0A6A8><EFBFBD> shift
ed_shift_on_off=1111111111110111b
ed_shift= 100b ;<3B><><EFBFBD><EFBFBD><EFBFBD><E7A0A5><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><20><> shift <20>.<2E>. <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ed_shift_off= 1111111111111011b
ed_shift_bac= 10000b ;<3B><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><20><EFBFBD><EBA4A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> shift <20>.<2E>. <20><><EFBFBD> <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><EBA4A5><EFBFBD><EFBFBD><EFBFBD>
ed_shift_bac_cl=1111111111101111b ;<3B><><EFBFBD><EFBFBD><20><><EFBFBD><><E3A4A0><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><EBA4A5><EFBFBD><EFBFBD><EFBFBD>
ed_shift_cl= 1111111111100011b
ed_shift_mcl= 1111111111111011b
ed_left_fl= 100000b
ed_right_fl= 1111111111011111b
ed_offset_fl= 1000000b
ed_offset_cl= 1111111110111111b
ed_insert= 10000000b
ed_insert_cl= 1111111101111111b
ed_mouse_on = 100000000b
ed_mous_adn_b= 100011000b
ed_mouse_on_off=1111111011111111b
ed_height=14 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;----------------------------------------------------
;CheckBox
;----------------------------------------------------
check_box_draw:
;ch_struc_size=24
ch_left equ [edi] ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><> <20>
ch_top equ [edi+2] ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><> <20>
ch_text_margin equ [edi+4] ;=4 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8><20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ch_size equ [edi+8] ;12 ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>
ch_color equ [edi+12]
ch_border_color equ [edi+16] ; or [edi+4] ;梥<><><E0A0AC> checkbox <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A0AC><EFBFBD><EFBFBD><EFBFBD>⥫쭮
ch_text_color equ [edi+20];[edi+4] ;梥<><><E2A5AA><EFBFBD>
ch_text_ptr equ [edi+24] ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><><EFBFBD><E2AEA2> <20><><EFBFBD>
ch_text_length equ [edi+28]
ch_flags equ [edi+32] ;䫠<><E4ABA0>
pusha ;<3B><><EFBFBD><EFBFBD><E0A0AD> <20><><EFBFBD><><E0A5A3><EFBFBD><EFBFBD><EFBFBD>
mov edi,dword [esp+36]
mov eax,13
movzx ebx,word ch_left
shl ebx,16
add ebx,ch_size
mov ecx,ch_top
shl ecx,16
add ecx,dword ch_size
mov edx,dword ch_border_color
mcall ;<3B><><EFBFBD>㥬 ࠬ<><E0A0AC>
mov edx,dword ch_color
add ebx,1 shl 16 - 2
add ecx,1 shl 16 - 2
mcall ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E8A8A2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A5AD><EFBFBD><EFBFBD><EFBFBD><><E7A5AA><EFBFBD><EFBFBD><EFBFBD>
test dword ch_flags,2 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> CF
jz @f ;<3B> <20>᫨ CF=1, <20><> <20><EFBFBD><EBAFAE><EFBFBD><EFBFBD><><E1ABA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E6A5A4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A5A9> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> @@
call check_box_draw_ch ;<3B><><EFBFBD><EFBFBD><EFBFBD><E1AEA2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E7A5AD><EFBFBD><20><><EFBFBD><EFBFBD>
@@:
;----------------------------
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><20><EFBFBD> <20><EFBFBD><E0AEA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><><E2A5AA><EFBFBD>
;----------------------------
movzx ebx,word ch_left ;<3B><><EFBFBD><EFBFBD><EFBFBD><E3A7A8> <20><><EFBFBD><EFBFBD><E7A5AD> <20> <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>
add ebx,dword ch_size
add ebx,dword ch_text_margin;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><20><><EFBFBD><E7ADA5><EFBFBD> <20><EFBFBD><><E2A5AA><EFBFBD>
shl ebx,16 ;ᤢ<><E1A4A2><EFBFBD><EFBFBD> <20><> 16 ࠧ<><EFBFBD> <20> <20><><EFBFBD><EFBFBD> (㬭<><E3ACAD><EFBFBD><EFBFBD> <20><> 65536)
mov bx,word ch_top ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD> <20><> y
add ebx,ch_size
mov ecx,dword ch_text_color ;<3B><><EFBFBD><EFBFBD><EFBFBD><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> + flags
sub ebx,7 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> -9+2
mov edx,dword ch_text_ptr ;㪠<><E3AAA0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><20><EFBFBD> <20><EFBFBD><EBA2AE><EFBFBD><EFBFBD> <20><><EFBFBD>
mov esi,dword ch_text_length
;<3B><><EFBFBD><20> eax <20><><EFBFBD><EFBFBD><E7A5AD> <20><EFBFBD><EBA2AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>
mov eax,4
mcall ;<3B><EFBFBD>
popa ;<3B><><EFBFBD><EFBFBD><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD><><E0A5A3><EFBFBD><20><> <20><EFBFBD>
ret 4 ;<3B><EFBFBD><EBA9A4> <20><> <20><><EFBFBD><EFBFBD><E6A5A4><EFBFBD>
check_box_clear_ch: ;<3B><><EFBFBD><EFBFBD>⪠ 祪 <20><><EFBFBD><EFBFBD><EFBFBD>
mov edx,dword ch_color ;梥<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>
jmp @f ;<3B><><EFBFBD><EFBFBD><EFBFBD><E1ABAE><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> @@
check_box_draw_ch: ;<3B><><EFBFBD><EFBFBD><EFBFBD><E1AEA2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E7A5AD><EFBFBD><20><><EFBFBD><EFBFBD>
mov edx,dword ch_border_color ;<3B><><EFBFBD><EFBFBD><EFBFBD><E3A7A8><>
@@:
movzx ebx,word ch_left ;<3B><><EFBFBD><EFBFBD><EFBFBD><E3A7A8> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20>
mov eax,dword ch_size
push ax
shr eax,2
add ebx,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8>/3)
shl ebx,16 ;ᤢ<><E1A4A2><EFBFBD><EFBFBD> <20><> 16 ࠧ<><EFBFBD> <20> <20><><EFBFBD><EFBFBD> (㬭<><E3ACAD><EFBFBD><EFBFBD> <20><> 65536)
pop bx
shr bx,1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><E3A7A8> (<28><><EFBFBD><EFBFBD> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8>/2)
mov bp,bx ;<3B><><EFBFBD><EFBFBD><E0A0AD><><E0A5A3><EFBFBD><EFBFBD> bx <20><><E0A5A3><EFBFBD><EFBFBD><EFBFBD><><E3AAA0><EFBFBD> <20><><EFBFBD><EFBFBD>
movzx ecx,word ch_top ;<3B><><EFBFBD><EFBFBD><EFBFBD><E3A7A8> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20>
mov eax,dword ch_size
shr eax,2
add ecx,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8>/4)
shl ecx,16 ;ᤢ<><E1A4A2><EFBFBD><EFBFBD> <20><> 16 ࠧ<><EFBFBD> <20> <20><><EFBFBD><EFBFBD> (㬭<><E3ACAD><EFBFBD><EFBFBD> <20><> 65536)
mov cx,bp ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD><><E0A5A3><EFBFBD><EFBFBD><EFBFBD><><E3AAA0><EFBFBD> <20><><EFBFBD><EFBFBD> <20> cx
mov eax,13 ;<3B> eax - <20><><EFBFBD><EFBFBD><E7A5AD> <20>㭪樨 <20><><EFBFBD> <20><EFBFBD><EBA2AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>.<2E>. <20><> <20><><EFBFBD><EFBFBD> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⮡ࠦ<E2AEA1><E0A0A6><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E7A5AD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD>
mcall ;<3B><EFBFBD>
ret ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><E6A5A4><EFBFBD>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;<3B><><EFBFBD><E0A0A1>稪 mouse
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
check_box_mouse: ;<3B><><EFBFBD><20><><EFBFBD><EFBFBD>
pusha
mov edi,dword [esp+36]
mov eax,37 ;<3B><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><20> <20><><EFBFBD> <20><><EFBFBD> - <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov ebx,2 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><E0A5A3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD> 2
mcall ;<3B><EFBFBD><20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><ECA7AE><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>
test eax,eax ;<3B><EFBFBD><20><20> <20><><EFBFBD> <20> eax=0, <20><> <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><> <20> <20><EFBFBD><EBA9A4>
jnz @f ;<3B><><EFBFBD><E0A5A9> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> @@
btr dword ch_flags,2 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> cf <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD> <20><> <20><EFBFBD><E3ABA5><EFBFBD>.
jmp check_box_mouse_end
@@:
bts dword ch_flags,2 ;<3B><EFBFBD>ઠ 䫠<><E4ABA0> <20>.<2E>. <20><><EFBFBD><E0A5AD> <20> cf <20><><EFBFBD><EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
jc check_box_mouse_end ;<3B>᫨ CF=1 <20><> <20><><EFBFBD><E0A5A9> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20>.<2E>. <20><><EFBFBD> <20><>
mov esi,dword ch_text_length ;<3B><><EFBFBD><EFBFBD><EFBFBD><E3A7A8> <20><><EFBFBD>-<2D><><><E1A8AC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E2AEA2> <20><><EFBFBD>
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> 6 <20><><EFBFBD><EFBFBD>஥ 㬭<><E3ACAD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><ECA7AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E2AEA4>, <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (386,486,P1)<29><><EFBFBD><EFBFBD><20><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Lea
;lea esi,[eax*2+eax]
;shl eax,1
imul esi,6 ; <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> ⠪ 㬭<><E3ACAD><EFBFBD><EFBFBD><EFBFBD> <20><> 6
add esi,dword ch_text_margin ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov eax,37 ;<3B><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><>
mov ebx,1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1
mcall ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E2ADAE>⥫쭮 <20><><EFBFBD><EFBFBD>
movzx ebx,word ch_top ;<3B><><EFBFBD><EFBFBD><EFBFBD><E3A7A8> <20> bx <20><><EFBFBD><EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20>
cmp ax,bx ;<3B><EFBFBD><E0A0A2><EFBFBD><EFBFBD> <20> <20> <20><><EFBFBD><EFBFBD><E0A4A8><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jl check_box_mouse_end ;SF <> OF <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
add ebx,dword ch_size ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E0A0A7><EFBFBD>
cmp ax,bx ;<3B><EFBFBD><E0A0A2><EFBFBD><EFBFBD>
jg check_box_mouse_end ;ZF = 0 <20> SF = OF <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
shr eax,16 ;ࠧ<><E0A0A7><EFBFBD><EFBFBD><EFBFBD> <20><> 65536 <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A4A2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> 16 <20><><EFBFBD><EFBFBD><E7A5AD>
movzx ebx,word ch_left ;<3B><EFBFBD><E0AEA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
cmp ax,bx ;<3B><EFBFBD><E0A0A2><EFBFBD><EFBFBD><><E0A5A3><EFBFBD><EFBFBD><EFBFBD>
jl check_box_mouse_end ;<3B><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
add ebx,dword ch_size ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8>
add ebx,esi ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><E7A5AD> <20><> <20> <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><E7A5AA><EFBFBD><EFBFBD><EFBFBD>
cmp ax,bx ;<3B><><EFBFBD><E0A0A2><EFBFBD><EFBFBD><><E0A5A3><EFBFBD><EFBFBD><EFBFBD>
jg check_box_mouse_end ;<3B><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
bts dword ch_flags,1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> cf <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD> <20><> 1.
jc @f ;CF=1 <20><> <20><><EFBFBD><E0A5A9> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> @@
call check_box_draw_ch ;<3B>⮡ࠧ<E2AEA1><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E7A5AD><EFBFBD><20><><EFBFBD><EFBFBD>
; mov dword [esp+24],1 ;<3B><><EFBFBD><EFBFBD><ECADA5><EFBFBD><EFBFBD> <20><EFBFBD>ઠ 祪 <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1ABA5>, <20><> <20><EFBFBD> <20> <20>⥪, <20><><EFBFBD> <20><><EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ecx <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0
jmp check_box_mouse_end ;<3B><><EFBFBD><EFBFBD><EFBFBD>
@@:
btr word ch_flags,1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> cf <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD> <20><> <20><EFBFBD><E3ABA5><EFBFBD>.
call check_box_clear_ch ;<3B><EFBFBD><EBAAAB><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD> <20>.<2E>. <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E8A5AD><EFBFBD><EFBFBD> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8> <20>⮡ࠧ<E2AEA1><E0A0A7><EFBFBD><><>.
check_box_mouse_end:
popa ;<3B><><EFBFBD><EFBFBD><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><><E0A5A3><EFBFBD><EFBFBD><EFBFBD> <20><> <20><EFBFBD>
ret 4 ;<3B><><EFBFBD><EFBFBD><EFBFBD>
;--------------------------------------------------
;radiobutton Group
;--------------------------------------------------
option_box_draw_box:
option_group equ [edi]
op_left equ [edi+4] ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><> <20>
op_top equ [edi+6] ;<3B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><> <20>
op_text_margin equ [edi+8] ;=4 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8><20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
op_size equ [edi+12] ;12 ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>
op_color equ [edi+16]
op_border_color equ [edi+20] ; or [edi+4] ;梥<><><E0A0AC> checkbox <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A0AC><EFBFBD><EFBFBD><EFBFBD>⥫쭮
op_text_color equ [edi+24];[edi+4] ;梥<><><E2A5AA><EFBFBD>
op_text_ptr equ [edi+28] ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><><EFBFBD><E2AEA2> <20><><EFBFBD>
op_text_length equ [edi+32]
op_flags equ [edi+36] ;䫠<><E4ABA0>
pusha ;<3B><><EFBFBD><EFBFBD><E0A0AD> <20><><EFBFBD><><E0A5A3><EFBFBD><EFBFBD><EFBFBD>
movzx ebx,word op_left
shl ebx,16
add ebx,dword op_size
movzx ecx,word op_top
shl ecx,16
add ecx,dword op_size
mov edx,dword op_border_color
mov eax,13
mcall ;<3B><><EFBFBD>㥬 ࠬ<><E0A0AC>
mov edx,dword op_color
add ebx,1 shl 16 - 2
add ecx,1 shl 16 - 2
mcall ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E8A8A2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A5AD><EFBFBD><EFBFBD><EFBFBD><><E7A5AA><EFBFBD><EFBFBD><EFBFBD>
; mov eax,dword option_group
; mov dword eax,[eax]
; cmp eax,edi
; jne @f
; call option_box_draw_op ;<3B><><EFBFBD><EFBFBD><EFBFBD><E1AEA2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E7A5AD><EFBFBD><20><><EFBFBD><EFBFBD>
;----------------------------
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><20><EFBFBD> <20><EFBFBD><E0AEA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><><E2A5AA><EFBFBD>
;----------------------------
@@: movzx ebx,word op_left ;<3B><><EFBFBD><EFBFBD><EFBFBD><E3A7A8> <20><><EFBFBD><EFBFBD><E7A5AD> <20> <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>
add ebx,dword op_size
add ebx,dword op_text_margin;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><20><><EFBFBD><E7ADA5><EFBFBD> <20><EFBFBD><><E2A5AA><EFBFBD>
shl ebx,16 ;ᤢ<><E1A4A2><EFBFBD><EFBFBD> <20><> 16 ࠧ<><EFBFBD> <20> <20><><EFBFBD><EFBFBD> (㬭<><E3ACAD><EFBFBD><EFBFBD> <20><> 65536)
mov bx,word op_top ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD> <20><> y
add ebx,op_size
mov ecx,dword op_text_color ;<3B><><EFBFBD><EFBFBD><EFBFBD><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> + flags
sub ebx,7 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> -9+2
mov edx,dword op_text_ptr ;㪠<><E3AAA0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><20><EFBFBD> <20><EFBFBD><EBA2AE><EFBFBD><EFBFBD> <20><><EFBFBD>
mov esi,dword op_text_length
;<3B><><EFBFBD><20> eax <20><><EFBFBD><EFBFBD><E7A5AD> <20><EFBFBD><EBA2AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>
mov eax,4
mcall ;<3B><EFBFBD>
popa ;<3B><><EFBFBD><EFBFBD><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD><><E0A5A3><EFBFBD><20><> <20><EFBFBD>
ret ;<3B><EFBFBD><EBA9A4> <20><> <20><><EFBFBD><EFBFBD><E6A5A4><EFBFBD>
option_box_clear_op: ;<3B><><EFBFBD><EFBFBD>⪠ 祪 <20><><EFBFBD><EFBFBD><EFBFBD>
mov edx,dword op_color ;梥<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>
jmp @f ;<3B><><EFBFBD><EFBFBD><EFBFBD><E1ABAE><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> @@
option_box_draw_op: ;<3B><><EFBFBD><EFBFBD><EFBFBD><E1AEA2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E7A5AD><EFBFBD><20><><EFBFBD><EFBFBD>
mov edx,dword op_border_color ;<3B><><EFBFBD><EFBFBD><EFBFBD><E3A7A8><>
@@:
movzx ebx,word op_left ;<3B><><EFBFBD><EFBFBD><EFBFBD><E3A7A8> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20>
mov eax,dword op_size
push ax
shr eax,2
add ebx,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8>/3)
shl ebx,16 ;ᤢ<><E1A4A2><EFBFBD><EFBFBD> <20><> 16 ࠧ<><EFBFBD> <20> <20><><EFBFBD><EFBFBD> (㬭<><E3ACAD><EFBFBD><EFBFBD> <20><> 65536)
pop bx
shr bx,1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><E3A7A8> (<28><><EFBFBD><EFBFBD> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8>/2)
mov bp,bx ;<3B><><EFBFBD><EFBFBD><E0A0AD><><E0A5A3><EFBFBD><EFBFBD> bx <20><><E0A5A3><EFBFBD><EFBFBD><EFBFBD><><E3AAA0><EFBFBD> <20><><EFBFBD><EFBFBD>
movzx ecx,word op_top ;<3B><><EFBFBD><EFBFBD><EFBFBD><E3A7A8> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20>
mov eax,dword op_size
shr eax,2
add ecx,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8>/4)
shl ecx,16 ;ᤢ<><E1A4A2><EFBFBD><EFBFBD> <20><> 16 ࠧ<><EFBFBD> <20> <20><><EFBFBD><EFBFBD> (㬭<><E3ACAD><EFBFBD><EFBFBD> <20><> 65536)
mov cx,bp ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD><><E0A5A3><EFBFBD><EFBFBD><EFBFBD><><E3AAA0><EFBFBD> <20><><EFBFBD><EFBFBD> <20> cx
mov eax,13 ;<3B> eax - <20><><EFBFBD><EFBFBD><E7A5AD> <20>㭪樨 <20><><EFBFBD> <20><EFBFBD><EBA2AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>.<2E>. <20><> <20><><EFBFBD><EFBFBD> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⮡ࠦ<E2AEA1><E0A0A6><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E7A5AD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD>
mcall ;<3B><EFBFBD>
ret ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><E6A5A4><EFBFBD>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;<3B><><EFBFBD><E0A0A1>稪 mouse
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
option_box_mouse_op: ;<3B><><EFBFBD><20><><EFBFBD><EFBFBD>
pusha
mov eax,37 ;<3B><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><20> <20><><EFBFBD> <20><><EFBFBD> - <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov ebx,2 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><E0A5A3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD> 2
mcall ;<3B><EFBFBD><20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><ECA7AE><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>
test eax,eax ;<3B><EFBFBD><20><20> <20><><EFBFBD> <20> eax=0, <20><> <20><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><> <20> <20><EFBFBD><EBA9A4>
jnz @f ;<3B><><EFBFBD><E0A5A9> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> @@
jmp option_box_mouse_end
;<3B><20><><EFBFBD> <20><> <20><EFBFBD><E0AEA8>諮, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><E2A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD><><E0A5A3><EFBFBD><20><> <20><EFBFBD>
;<3B><>
@@:
mov esi,dword op_text_length ;<3B><><EFBFBD><EFBFBD><EFBFBD><E3A7A8> <20><><EFBFBD>-<2D><><><E1A8AC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E2AEA2> <20><><EFBFBD>
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> 6 <20><><EFBFBD><EFBFBD>஥ 㬭<><E3ACAD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><ECA7AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E2AEA4>, <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (386,486,P1)<29><><EFBFBD><EFBFBD><20><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Lea
;lea esi,[eax*2+eax]
;shl eax,1
imul esi,6 ; <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> ⠪ 㬭<><E3ACAD><EFBFBD><EFBFBD><EFBFBD> <20><> 6
xor ebx,ebx
add esi,dword op_text_margin ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov eax,37 ;<3B><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><>
inc ebx ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1
mcall ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E2ADAE>⥫쭮 <20><><EFBFBD><EFBFBD>
movzx ebx,word op_top ;<3B><><EFBFBD><EFBFBD><EFBFBD><E3A7A8> <20> bx <20><><EFBFBD><EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20>
cmp ax,bx ;<3B><EFBFBD><E0A0A2><EFBFBD><EFBFBD> <20> <20> <20><><EFBFBD><EFBFBD><E0A4A8><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jl option_box_mouse_end ;SF <> OF <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
add ebx,dword op_size ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E0A0A7><EFBFBD>
cmp ax,bx ;<3B><EFBFBD><E0A0A2><EFBFBD><EFBFBD>
jg option_box_mouse_end ;ZF = 0 <20> SF = OF <20><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
shr eax,16 ;ࠧ<><E0A0A7><EFBFBD><EFBFBD><EFBFBD> <20><> 65536 <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A4A2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> 16 <20><><EFBFBD><EFBFBD><E7A5AD>
movzx ebx,word op_left ;<3B><EFBFBD><E0AEA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
cmp ax,bx ;<3B><EFBFBD><E0A0A2><EFBFBD><EFBFBD><><E0A5A3><EFBFBD><EFBFBD><EFBFBD>
jl option_box_mouse_end ;<3B><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
add ebx,dword op_size ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>אַ㣮<EFACAE><EFBFBD><ECADA8>
add ebx,esi ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><E7A5AD> <20><> <20> <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><E7A5AA><EFBFBD><EFBFBD><EFBFBD>
cmp ax,bx ;<3B><><EFBFBD><E0A0A2><EFBFBD><EFBFBD><><E0A5A3><EFBFBD><EFBFBD><EFBFBD>
jg option_box_mouse_end ;<3B><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov eax,dword option_group
mov [eax],edi
option_box_mouse_end:
popa ;<3B><><EFBFBD><EFBFBD><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><><E0A5A3><EFBFBD><EFBFBD><EFBFBD> <20><> <20><EFBFBD>
ret ;<3B><><EFBFBD><EFBFBD><EFBFBD>
option_box_draw:
pusha
mov eax,dword [esp+36]
@@: mov edi,dword [eax]
test edi,edi
je option_check
call option_box_draw_box
add eax,4
jmp @b
option_check:
mov eax,dword [esp+36]
@@: mov edi,dword [eax]
test edi,edi
je @f
mov ebx,dword [edi]
mov ebx,dword [ebx]
cmp edi,ebx
jne .clear_op
pusha
call option_box_draw_op
popa
add eax,4
jmp @b
.clear_op:
pusha
call option_box_clear_op
popa
add eax,4
jmp @b
@@: popa
ret 4
; exit <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> :)
option_box_mouse:
pusha
mov eax,dword [esp+36]
@@: mov edi,dword [eax]
test edi,edi
je option_check
call option_box_mouse_op
add eax,4
jmp @b
align 16
EXPORTS:
dd sz_edit_box, edit_box
dd sz_edit_box_key, edit_box_key
dd sz_edit_box_mouse, edit_box_mouse
dd szVersion_ed, 0x00000001
dd sz_check_box_draw, check_box_draw
dd sz_check_box_mouse, check_box_mouse
dd szVersion_ch, 0x00000001
dd sz_option_box_draw, option_box_draw
dd sz_option_box_mouse, option_box_mouse
dd szVersion_op, 0x00000001
dd 0,0
sz_edit_box db 'edit_box',0
sz_edit_box_key db 'edit_box_key',0
sz_edit_box_mouse db 'edit_box_mouse',0
szVersion_ed db 'version_ed',0
sz_check_box_draw db 'check_box_draw',0
sz_check_box_mouse db 'check_box_mouse',0
szVersion_ch db 'version_ch',0
sz_option_box_draw db 'option_box_draw',0
sz_option_box_mouse db 'option_box_mouse',0
szVersion_op db 'version_op',0
;;;;;;;;;;;
;;Data
;;;;;;;;;;;
align 16
mouse_flag dd 0x0