box_lib: ability to disable editbox. (Fixed color because of fixed editbox struct!)

git-svn-id: svn://kolibrios.org@5679 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2015-08-05 09:34:02 +00:00
parent b004b5af85
commit b022e7e98b
2 changed files with 167 additions and 160 deletions

View File

@ -33,26 +33,27 @@ ed_always_focus= 100000000000000b
ed_focus= 10b ;䮪ãá ¯à¨«®¦¥­¨ï ed_focus= 10b ;䮪ãá ¯à¨«®¦¥­¨ï
ed_pass= 1b ;¯®«¥ á ¯ à®«¥¬ ed_pass= 1b ;¯®«¥ á ¯ à®«¥¬
ed_shift_on= 1000b ;¥á«¨ ­¥ ãáâ ­®¢«¥­ -§­ ç¨â ¢¯¥à¢ë¥ ­ ¦ â shift,¥á«¨ ¡ë« ãáâ ­®¢«¥­, §­ ç¨â ¬ë 㦥 çâ® - â® ¤¥« «¨ 㤥ন¢ ï shift ed_shift_on= 1000b ;¥á«¨ ­¥ ãáâ ­®¢«¥­ -§­ ç¨â ¢¯¥à¢ë¥ ­ ¦ â shift,¥á«¨ ¡ë« ãáâ ­®¢«¥­, §­ ç¨â ¬ë 㦥 çâ® - â® ¤¥« «¨ 㤥ন¢ ï shift
ed_shift_on_off=1111111111110111b ed_shift_on_off= not (ed_shift_on)
ed_shift= 100b ;¢ª«îç ¥âáï ¯à¨ ­ ¦ â¨¨ ­  shift â.¥. ¥á«¨ ­ ¦¨¬ î ed_shift= 100b ;¢ª«îç ¥âáï ¯à¨ ­ ¦ â¨¨ ­  shift â.¥. ¥á«¨ ­ ¦¨¬ î
ed_shift_off= 1111111111111011b ed_shift_off= not (ed_shift)
ed_shift_bac= 10000b ;¡¨â ¤«ï ®ç¨á⪨ ¢ë¤¥«¥­®£® shift â.¥. ¯à¨ ãáâ ­®¢ª¥ £®¢®à¨â çâ® ¥áâì ¢ë¤¥«¥­¨¥ ed_shift_bac= 10000b ;¡¨â ¤«ï ®ç¨á⪨ ¢ë¤¥«¥­®£® shift â.¥. ¯à¨ ãáâ ­®¢ª¥ £®¢®à¨â çâ® ¥áâì ¢ë¤¥«¥­¨¥
ed_shift_bac_cl=1111111111101111b ;®ç¨á⪠ ¯à¨ 㤠«¥­¨¨ ¢ë¤¥«¥­¨ï ed_shift_bac_cl= not (ed_shift_bac)
ed_shift_cl= 1111111111100011b ed_shift_cl= not (ed_shift or ed_shift_bac or ed_shift_on)
ed_shift_mcl= 1111111111111011b ed_shift_mcl= not (ed_shift)
ed_left_fl= 100000b ed_left_fl= 100000b
ed_right_fl= 1111111111011111b ed_right_fl= not (ed_left_fl)
ed_offset_fl= 1000000b ed_offset_fl= 1000000b
ed_offset_cl= 1111111110111111b ed_offset_cl= not (ed_offset_fl)
ed_insert= 10000000b ed_insert= 10000000b
ed_insert_cl= 1111111101111111b ed_insert_cl= not (ed_insert)
ed_mouse_on = 100000000b ed_mouse_on = 100000000b
ed_mous_adn_b= 100011000b ed_mous_adn_b= 100011000b
ed_mouse_on_off=1111111011111111b ed_mouse_on_off= not (ed_mouse_on)
ed_ctrl_on = 1000000000b ed_ctrl_on = 1000000000b
ed_ctrl_off = 1111110111111111b ed_ctrl_off = not (ed_ctrl_on)
ed_alt_on = 10000000000b ed_alt_on = 10000000000b
ed_alt_off = 1111101111111111b ed_alt_off = not (ed_alt_on)
ed_disabled= 100000000000b
ed_height=14 ; ¢ëá®â  ed_height=14 ; ¢ëá®â 
struc edit_box width,left,top,color,shift_color,focus_border_color,\ struc edit_box width,left,top,color,shift_color,focus_border_color,\

View File

@ -46,9 +46,9 @@ edit_box_key:
pushad pushad
mov edi,dword [esp+36] mov edi,dword [esp+36]
test word ed_flags,ed_focus ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬ test word ed_flags,ed_focus ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
je edit_box.editbox_exit jz edit_box.editbox_exit
test word ed_flags,ed_mouse_on test word ed_flags,ed_mouse_on or ed_disabled
jne edit_box.editbox_exit jnz edit_box.editbox_exit
;-------------------------------------- ;--------------------------------------
; this code for Win-keys, works with ; this code for Win-keys, works with
@ -130,6 +130,8 @@ macro use_editbox_mouse
edit_box_mouse: edit_box_mouse:
pushad pushad
mov edi,dword [esp+36] mov edi,dword [esp+36]
test word ed_flags,ed_disabled
jnz edit_box.editbox_exit
;debug ;debug
;---------------------------------------------------------- ;----------------------------------------------------------
;--- ¯®«ãç ¥¬ á®áâ®ï­¨¥ ª­®¯®ª ¬ëè¨ ----------------------- ;--- ¯®«ãç ¥¬ á®áâ®ï­¨¥ ª­®¯®ª ¬ëè¨ -----------------------
@ -265,6 +267,10 @@ edit_box.draw_bg:
mov ebx,ed_left mov ebx,ed_left
add ebx,1 add ebx,1
mov edx,ed_color 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 shl ebx,16
add ebx,ed_width add ebx,ed_width
sub ebx,1 sub ebx,1