Rev 446 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 446 | Rev 449 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | ; |
|
1 | ; |
2 | ; |
2 | ; |
3 | ; |
3 | ; |
4 | ; |
4 | ; |
5 | ; |
5 | ; |
6 | ; |
Line 889... | Line 890... | ||
889 | ;========================================================== |
890 | ;========================================================== |
890 | ;=== ®¡à ¡®âª ¬ëè¨ ======================================= |
891 | ;=== ®¡à ¡®âª ¬ëè¨ ======================================= |
891 | ;========================================================== |
892 | ;========================================================== |
892 | .mouse: |
893 | .mouse: |
893 | pusha |
894 | pusha |
- | 895 | mov eax,dword [mouse_flag] |
|
- | 896 | test eax,eax |
|
- | 897 | jz @f |
|
- | 898 | cmp eax,edi |
|
- | 899 | je @f |
|
- | 900 | ||
- | 901 | popa |
|
- | 902 | ret |
|
894 | ;---------------------------------------------------------- |
903 | ;---------------------------------------------------------- |
895 | ;--- ¯®«ãç ¥¬ á®áâ®ï¨¥ ª®¯®ª ¬ëè¨ ----------------------- |
904 | ;--- ¯®«ãç ¥¬ á®áâ®ï¨¥ ª®¯®ª ¬ëè¨ ----------------------- |
896 | ;---------------------------------------------------------- |
905 | ;---------------------------------------------------------- |
- | 906 | @@: |
|
897 | mov eax,37 |
907 | mov eax,37 |
898 | mov ebx,2 |
908 | mov ebx,2 |
899 | int 0x40 |
909 | int 0x40 |
900 | ;---------------------------------------------------------- |
910 | ;---------------------------------------------------------- |
901 | ;--- ¯à®¢¥à塞 á®áâ®ï¨¥ ---------------------------------- |
911 | ;--- ¯à®¢¥à塞 á®áâ®ï¨¥ ---------------------------------- |
902 | ;---------------------------------------------------------- |
912 | ;---------------------------------------------------------- |
903 | test eax,1 |
913 | test eax,1 |
904 | jnz .mouse_left_button |
914 | jnz .mouse_left_button |
905 | and word ed_flags,ed_mouse_on_off |
915 | and word ed_flags,ed_mouse_on_off |
- | 916 | xor ebx,ebx |
|
- | 917 | mov dword [mouse_flag],ebx |
|
906 | popa |
918 | popa |
907 | ret |
919 | ret |
- | 920 | ;---------------------------------------------------------- |
|
- | 921 | ;--- ¡à ¡®âª .mouse_wigwag |
|
- | 922 | ;---------------------------------------------------------- |
|
- | 923 | .mouse_wigwag: |
|
- | 924 | shr eax,16 |
|
- | 925 | or word ed_flags,ed_shift_on+ed_shift |
|
- | 926 | ||
- | 927 | mov ecx,structure_of_potock |
|
- | 928 | mov ebx,dword [ecx+34] |
|
- | 929 | add ebx,ed_left |
|
- | 930 | add ebx,5 |
|
- | 931 | cmp eax,ebx |
|
- | 932 | jl .left |
|
- | 933 | add ebx,ed_width |
|
- | 934 | cmp eax,ebx |
|
- | 935 | jg .right |
|
- | 936 | jmp ._mvpos |
|
Line 908... | Line 937... | ||
908 | 937 | ||
909 | .mouse_left_button: |
938 | .mouse_left_button: |
910 | ;---------------------------------------------------------- |
939 | ;---------------------------------------------------------- |
- | 940 | ;--- ¬®¤¨ä¨æ¨à㥬 ª®®à¤¨ âë, â.¥. ¤®¡ ¢«ï¥¬ ª®®à¤¨ âë ®ª . |
|
- | 941 | ;---------------------------------------------------------- |
|
- | 942 | mov eax,9 |
|
- | 943 | mov ebx,structure_of_potock |
|
- | 944 | or ecx,-1 |
|
- | 945 | int 0x40 |
|
- | 946 | ;---------------------------------------------------------- |
|
911 | ;--- ¯®«ãç ¥¬ ª®®à¤¨ âë ¬ëè¨ ----------------------------- |
947 | ;--- ¯®«ãç ¥¬ ª®®à¤¨ âë ¬ëè¨ ®â®á¨â¥«ì® 0 â.¥ ¢á¥© ®¡« á⨠íªà |
912 | ;---------------------------------------------------------- |
948 | ;---------------------------------------------------------- |
913 | mov eax,37 |
949 | mov eax,37 |
914 | xor ebx,ebx |
- | |
915 | inc ebx |
950 | xor ebx,ebx |
916 | int 0x40 |
951 | int 0x40 |
- | 952 | ;---------------------------------------------------------- |
|
- | 953 | ;--- ¥ 㤥ন¢ ¥¬ «¨ ¬ë ª« ¢¨èã ¬ë誨, ¯¥à¥¬¥é ï ªãàá®à, ¢® ¢á¥ à §ë¥ áâ®à®ë? |
|
- | 954 | ;---------------------------------------------------------- |
|
- | 955 | mov ecx,structure_of_potock |
|
- | 956 | test word ed_flags,ed_mouse_on |
|
- | 957 | jne .mouse_wigwag |
|
917 | ;---------------------------------------------------------- |
958 | ;---------------------------------------------------------- |
918 | ;--- ¯à®¢¥à塞, ¯®¯ ¤ ¥â «¨ ªãàá®à ¢ edit box ------------- |
959 | ;--- ¯à®¢¥à塞, ¯®¯ ¤ ¥â «¨ ªãàá®à ¢ edit box ------------- |
- | 960 | ;---------------------------------------------------------- |
|
919 | ;---------------------------------------------------------- |
961 | mov ebx,dword [ecx+38] |
- | 962 | add ebx,ed_top |
|
920 | mov ebx,ed_top |
963 | add ebx,22 |
921 | cmp ax,bx |
964 | cmp ax,bx |
Line 922... | Line 965... | ||
922 | jl ._blur;.mouse_end_no_focus |
965 | jl ._blur;.mouse_end_no_focus |
923 | 966 | ||
924 | add bx,ed_height |
967 | add ebx,ed_height |
Line 925... | Line 968... | ||
925 | cmp ax,bx |
968 | cmp ax,bx |
Line -... | Line 969... | ||
- | 969 | jg ._blur;.mouse_end_no_focus |
|
926 | jg ._blur;.mouse_end_no_focus |
970 | |
- | 971 | shr eax,16 |
|
927 | 972 | ||
928 | shr eax,16 |
973 | mov ebx,dword [ecx+34] |
Line 929... | Line 974... | ||
929 | 974 | add ebx,ed_left |
|
930 | mov bx,ed_left |
975 | add ebx,5 |
931 | cmp ax,bx |
976 | cmp ax,bx |
932 | jl ._blur;.mouse_end_no_focus |
977 | jl ._blur;.mouse_end_no_focus |
933 | 978 | ||
934 | add bx,ed_width |
979 | add ebx,ed_width |
935 | cmp ax,bx |
980 | cmp ax,bx |
936 | jg ._blur;.mouse_end_no_focus |
981 | jg ._blur;.mouse_end_no_focus |
- | 982 | ;--- ¨§¬¥ï¥¬ ¯®§¨æ¨î ªãàá®à --- |
|
- | 983 | push eax |
|
- | 984 | mov ebp,ed_color |
|
937 | ;--- ¨§¬¥ï¥¬ ¯®§¨æ¨î ªãàá®à --- |
985 | call .clear_cursor |
938 | push eax |
986 | pop eax |
939 | mov ebp,ed_color |
987 | ._mvpos: |
- | 988 | mov ecx,structure_of_potock |
|
940 | call .clear_cursor |
989 | mov ebx,dword [ecx+34] |
941 | pop eax |
990 | xor edx,edx |
942 | xor dx,dx |
991 | sub eax,ed_left |
943 | sub ax,ed_left |
992 | sub eax,ebx |
944 | add ax,2 |
993 | sub eax,5-2 ;â®«é¨ ®¡¢®¤ª¨ ᪨ =5 |
945 | mov bx,6 |
994 | mov ebx,6 |
946 | div bx |
995 | div bx |
947 | add ax,ed_offset |
996 | add eax,ed_offset |
948 | cmp ax,ed_size |
997 | cmp eax,ed_size |
949 | jna @f |
998 | jna ._mshift |
950 | mov ax,ed_size |
999 | mov eax,ed_size |
951 | @@: |
1000 | ._mshift: |
Line 963... | Line 1012... | ||
963 | @@: |
1012 | @@: |
964 | test word ed_flags,ed_mouse_on |
1013 | test word ed_flags,ed_mouse_on |
965 | jne @f |
1014 | jne @f |
Line 966... | Line 1015... | ||
966 | 1015 | ||
967 | mov dword ed_shift_pos,eax |
1016 | mov dword ed_shift_pos,eax |
968 | or word ed_flags,ed_mouse_on |
1017 | or word ed_flags,ed_mous_adn_b;ed_mouse_on |
969 | mov dword ed_pos,eax |
1018 | mov dword ed_pos,eax |
970 | jmp .m_sh |
1019 | jmp .m_sh |
971 | @@: |
1020 | @@: |
972 | cmp eax,dword ed_shift_pos ;¥á«¨ ¯®§¨æ¨¨ ¥ ¨§¬¥¨«¨áì |
1021 | cmp eax,dword ed_shift_pos ;¥á«¨ ¯®§¨æ¨¨ ¥ ¨§¬¥¨«¨áì |
973 | je @f |
1022 | je .mouse_ex |
974 | mov ed_pos,eax |
1023 | mov ed_pos,eax |
975 | mov ebp,dword shift_color |
1024 | mov ebp,dword shift_color |
976 | mov ebx,dword ed_shift_pos |
1025 | mov ebx,dword ed_shift_pos |
977 | call .sh_cl_ |
1026 | call .sh_cl_ |
978 | or word ed_flags,ed_mous_adn_b ;ãáâ ®¢¨¬ ¡¨â çâ® ¬ë ¢ë¤¥«¨«¨ |
- | |
- | 1027 | or word ed_flags,ed_mous_adn_b ;ãáâ ®¢¨¬ ¡¨â çâ® ¬ë ¢ë¤¥«¨«¨ +shift_on + |
|
979 | 1028 | mov dword [mouse_flag],edi |
|
980 | .m_sh: call .draw_text |
1029 | .m_sh: call .draw_text |
981 | call .draw_cursor |
1030 | call .draw_cursor |
982 | ;---------------------------------------------------------- |
1031 | ;---------------------------------------------------------- |
983 | ;--- ¯à®æ¥¤ãà ãáâ ®¢ª¨ 䮪ãá --------------------------- |
1032 | ;--- ¯à®æ¥¤ãà ãáâ ®¢ª¨ 䮪ãá --------------------------- |
984 | ;---------------------------------------------------------- |
1033 | ;---------------------------------------------------------- |
985 | bts word ed_flags,1 |
1034 | bts word ed_flags,1 |
986 | jc @f |
1035 | jc .mouse_ex |
987 | jmp .drc |
1036 | jmp .drc |
988 | ._blur: |
1037 | ._blur: |
989 | test word ed_flags,ed_always_focus |
1038 | test word ed_flags,ed_always_focus |
990 | jne @f |
1039 | jne .mouse_ex |
991 | btr word ed_flags,1 ; ¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬ |
1040 | btr word ed_flags,1 ; ¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬ |
Line 992... | Line 1041... | ||
992 | jnc @f |
1041 | jnc .mouse_ex |
993 | 1042 | ||
994 | mov ebp,ed_color |
1043 | mov ebp,ed_color |
- | 1044 | call .clear_cursor |
|
995 | call .clear_cursor |
1045 | .drc: call .draw_border |
996 | .drc: call .draw_border |
1046 | .mouse_ex: |
997 | @@: |
1047 | |
998 | popa |
- | |
999 | ret |
1048 | popa |
1000 | 1049 | ret |
|
1001 | ;---------------------------------------------------------- |
1050 | ;---------------------------------------------------------- |
1002 | ;--- ¯à®æ¥¤ãà à §¬ë¢ ¨ï 䮪ãá -------------------------- |
1051 | ;--- ¯à®æ¥¤ãà à §¬ë¢ ¨ï 䮪ãá -------------------------- |
1003 | ;---------------------------------------------------------- |
1052 | ;---------------------------------------------------------- |