Subversion Repositories Kolibri OS

Rev

Rev 6342 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6342 Rev 6359
Line 13... Line 13...
13
	    jnz next_byte_cleare
13
	    jnz next_byte_cleare
14
	    call print_line
14
	    call print_line
15
	    call print_cursor
15
	    call print_cursor
Line 16... Line 16...
16
 
16
 
-
 
17
opros:
17
      opros:
18
	mcall SF_SLEEP, 5 ;fix cpu use 100%
Line 18... Line 19...
18
	    mcall SF_WAIT_EVENT
19
	mcall SF_WAIT_EVENT
-
 
20
 
-
 
21
	cmp eax,1 ;redraw window
-
 
22
	jne @f
-
 
23
		call dialog2_draw
-
 
24
 
-
 
25
		mov ebx,[string_x]
19
 
26
		shl ebx,16
-
 
27
		add ebx,[string_y]
-
 
28
		mov edx,string_
-
 
29
		mov esi,[MaxSizeString]
-
 
30
		mcall SF_DRAW_TEXT,,0
20
	    cmp eax,1 ;redraw window
31
		jmp opros
21
	    je exit_cycle
32
	@@:
Line 22... Line 33...
22
	    cmp eax,3 ;press button
33
	cmp eax,3 ;press button
23
	    je exit_cycle
34
	je exit_cycle
Line 150... Line 161...
150
string_       rb 65
161
string_       rb 65
151
position      dd 0
162
position      dd 0
152
MaxSizeString dd 0
163
MaxSizeString dd 0
153
string_x      dd 0
164
string_x      dd 0
154
string_y      dd 0
165
string_y      dd 0
155
;**********************************************************
-
 
-
 
166
 
156
;----------------------------------------------------------
167
;----------------------------------------------------------
-
 
168
;input:
-
 
169
; eax - pointer to string
-
 
170
;output:
157
  value:
171
; eax - value
-
 
172
str_to_int:
158
	xor edx,edx
173
	xor edx,edx
159
  cycle_value_:
174
  cycle_value_:
160
	xor ebx,ebx
175
	xor ebx,ebx
161
	mov bl,byte[eax]
176
	mov bl,byte[eax]
Line 230... Line 245...
230
	dec [length_number]
245
	dec [length_number]
231
	jnz cycle_value_
246
	jnz cycle_value_
232
	error:
247
	error:
233
	mov eax,edx
248
	mov eax,edx
234
	ret
249
	ret
-
 
250
 
235
;----------------------------------------------------------
251
;----------------------------------------------------------
-
 
252
align 4
-
 
253
dialog2_draw:
-
 
254
	mov	eax,80
-
 
255
	mov	ebx,100
-
 
256
	mov	ecx,150
-
 
257
	mov	edx,90
-
 
258
	mov esi,1
-
 
259
	call draw_volume_rectangle ; dialog 'file new'
-
 
260
 
-
 
261
	mov	eax,177
-
 
262
	mov	ebx,115
-
 
263
	mov	ecx,40
-
 
264
	mov	edx,14
-
 
265
	mov esi,4
-
 
266
	call draw_volume_rectangle
-
 
267
 
-
 
268
	mov	eax,177
-
 
269
	mov	ebx,115+24
-
 
270
	mov	ecx,40
-
 
271
	mov	edx,14
-
 
272
	mov esi,4
-
 
273
	call draw_volume_rectangle
-
 
274
 
-
 
275
	mov	eax,177
-
 
276
	mov	ebx,170
-
 
277
	mov	ecx,40
-
 
278
	mov	edx,15
-
 
279
	mov	esi,1
-
 
280
	call draw_volume_rectangle ; button [Ok]
-
 
281
 
-
 
282
	mov	eax,90
-
 
283
	mov	ebx,118
-
 
284
	mov	ecx,0xffffff
-
 
285
	mov	edx,new_text1
-
 
286
	mov	esi,14
-
 
287
	call print_text
-
 
288
 
-
 
289
	mov	eax,90
-
 
290
	mov	ebx,118+24
-
 
291
	mov	ecx,0xffffff
-
 
292
	mov	edx,new_text2
-
 
293
	mov	esi,14
-
 
294
	call print_text
-
 
295
 
-
 
296
	mov	eax,185
-
 
297
	mov	ebx,175
-
 
298
	mov	ecx,0xffffff
-
 
299
	mov	edx,ok_text
-
 
300
	mov	esi,2
-
 
301
	call print_text
-
 
302
	ret
-
 
303
 
236
length_number	dd 0
304
length_number	dd 0
237
305