Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
7538 | leency | 1 | |
2 | ; int num_buttons, const char* buttons[]); |
||
3 | |||
4 | |||
5 | pushad |
||
6 | cmp [num_strings],1 |
||
7 | je @f |
||
8 | m2m [errmess0], strErrorExc |
||
9 | jmp .l1 |
||
10 | @@: |
||
11 | mov ebx,[strings] |
||
12 | m2m [errmess0], dword [ebx] |
||
13 | .l1: |
||
14 | mcall 51,1,threadSayErr,stackDlg |
||
15 | popad |
||
16 | mov eax,1 |
||
17 | ret |
||
18 | endp |
||
19 | |||
20 | |||
21 | pushad |
||
22 | m2m [errmess0],[str] |
||
23 | mcall 51,1,threadSayErr,stackDlg |
||
24 | popad |
||
25 | ret |
||
26 | endp |
||
27 | |||
28 | |||
29 | |||
30 | mcall 40, 000111b+0C000000h |
||
31 | |||
32 | |||
33 | mcall 12, 1 |
||
34 | mcall 48, 3, sc, sizeof.system_colors |
||
35 | mov edx, [sc.work] |
||
36 | |||
37 | |||
38 | mcall 0, <220,420>, <220,110>, , , title |
||
39 | |||
40 | |||
41 | or ecx,90000000h |
||
42 | mov edx,[errmess0] |
||
43 | mcall 4, <15,11> |
||
44 | |||
45 | |||
46 | mov ecx,[sc.work_button_text] |
||
47 | or ecx,90000000h |
||
48 | mcall 4, <147,51>, , strOk |
||
49 | |||
50 | |||
51 | |||
52 | |||
53 | mcall 10 |
||
54 | cmp eax, 1 |
||
55 | je .wm_redraw |
||
56 | cmp eax, 2 |
||
57 | je .wm_key |
||
58 | cmp eax, 3 |
||
59 | je .wm_button |
||
60 | jmp .still |
||
61 | |||
62 | |||
63 | mcall 17 |
||
64 | |||
65 | |||
66 | je .exit |
||
67 | jmp .still |
||
68 | |||
69 | |||
70 | mcall 2 |
||
71 | jmp .still |
||
72 | .exit: |
||
73 | mcall -1 |
||
74 | endp |
||
75 | |||
76 | |||
77 | ;------------------------------------------------------------------------------- |
||
78 | ;------------------------------------------------------------------------------- |
||
79 | ; "enter password" dialog for KFar |
||
80 | ;password_dlg: |
||
81 | ; dd 1 ; use standard dialog colors |
||
82 | ; dd -1 ; center window by x |
||
83 | ; dd -1 ; center window by y |
||
84 | ;.width dd ? ; width (will be filled according to current console width) |
||
85 | ; dd 2 ; height |
||
86 | ; dd 4, 2 ; border size |
||
87 | ; dd aEnterPasswordTitle ; title |
||
88 | ; dd ? ; colors (will be set by KFar) |
||
89 | ; dd 0 ; used internally by dialog manager, ignored |
||
90 | ; dd 0, 0 ; reserved for DlgProc |
||
91 | ; dd 2 ; 2 controls |
||
92 | ;; the string "enter password" |
||
93 | ; dd 1 ; type: static |
||
94 | ; dd 1,0 ; upper-left position |
||
95 | ;.width1 dd ?,0 ; bottom-right position |
||
96 | ; dd aEnterPassword ; data |
||
97 | ; dd 0 ; flags |
||
98 | ;; editbox for password |
||
99 | ; dd 3 ; type: edit |
||
100 | ; dd 1,1 ; upper-left position |
||
101 | ;.width2 dd ?,0 ; bottom-right position |
||
102 | ; dd password_data ; data |
||
103 | ; dd 2Ch ; flags |
||
104 | |||
105 | |||
106 | |||
107 | |||
108 | pushad |
||
109 | mov ebx,[dlgInfo] |
||
110 | mov eax,[ebx+19*4] |
||
111 | mov [forpassword],eax |
||
112 | mov byte[eax], 0 |
||
113 | mov [stateDlg], 0 |
||
114 | mcall 51,1,threadDialogBox,stackDlg |
||
115 | |||
116 | |||
117 | @@: cmp [stateDlg],0 |
||
118 | jne @f |
||
119 | mcall 5,1 |
||
120 | jmp @b |
||
121 | @@: |
||
122 | popad |
||
123 | cmp [stateDlg], 1 |
||
124 | jne @f |
||
125 | xor eax, eax |
||
126 | ret |
||
127 | @@: |
||
128 | or eax, -1 |
||
129 | ret |
||
130 | endp |
||
131 | |||
132 | |||
133 | |||
134 | |||
135 | mov eax,[forpassword] |
||
136 | mov [edtPassword+4*9],eax |
||
137 | xor eax,eax |
||
138 | mov dword[edtPassword.size], eax |
||
139 | mov dword[edtPassword.pos], eax |
||
140 | |||
141 | |||
142 | mcall 12, 1 |
||
143 | mcall 48, 3, sc, sizeof.system_colors |
||
144 | mov edx, [sc.work] |
||
145 | or edx, 0x33000000 |
||
146 | mcall 0, <200,320>, <200,140>, , , title |
||
147 | |||
148 | |||
149 | stdcall [edit_box_draw],edtPassword |
||
150 | |||
151 | |||
152 | |||
153 | or ecx,90000000h |
||
154 | mcall 4, <56,12>, , strGetPass |
||
155 | |||
156 | |||
157 | mov ecx,[sc.work_button_text] |
||
158 | or ecx,90000000h |
||
159 | mcall 4, <103,79>, , strOk |
||
160 | |||
161 | |||
162 | mov ecx,[sc.work_button_text] |
||
163 | or ecx,90000000h |
||
164 | mcall 4, <182,79>, , strCancel |
||
165 | |||
166 | |||
167 | |||
168 | |||
169 | |||
170 | mcall 10 |
||
171 | cmp eax, 1 |
||
172 | je .wm_redraw |
||
173 | cmp eax, 2 |
||
174 | je .wm_key |
||
175 | cmp eax, 3 |
||
176 | je .wm_button |
||
177 | cmp eax, 6 |
||
178 | je .wm_mouse |
||
179 | |||
180 | |||
181 | |||
182 | |||
183 | mcall 2 |
||
184 | stdcall [edit_box_key],edtPassword |
||
185 | jmp .still |
||
186 | |||
187 | |||
188 | |||
189 | mcall 17 |
||
190 | |||
191 | |||
192 | jne @f |
||
193 | mov [stateDlg],1 |
||
194 | jmp .exit |
||
195 | @@: |
||
196 | |||
197 | |||
198 | jne .still |
||
199 | mov [stateDlg],2 |
||
200 | jmp .exit |
||
201 | |||
202 | |||
203 | stdcall [edit_box_mouse],edtPassword |
||
204 | |||
205 | |||
206 | |||
207 | |||
208 | |||
209 | mcall -1 |
||
210 | endp182,79>74,22>165,80>103,79>74,22>70,80>56,12>200,140>200,320>147,51>45,25>105,100>15,11>220,110>220,420> |
||
211 |