Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 485 → Rev 484

/programs/demos/cslide/trunk/cslide.asm
20,7 → 20,6
dd 0x0 , 0x0 ; I_Param , I_Icon
 
include 'lang.inc'
include '..\..\..\macros.inc'
START: ; start of execution
 
call draw_window ; at first, draw the window
30,7 → 29,7
 
mov eax,23
mov ebx,2
mcall
int 0x40
 
cmp eax,1 ; redraw request ?
je red
47,12 → 46,12
 
key: ; key
mov eax,2 ; just read it and ignore
mcall
int 0x40
jmp still
 
button: ; button
mov eax,17 ; get id
mcall
int 0x40
 
shr eax,8
 
59,7 → 58,7
cmp eax,1 ; button id=1 ?
jne noclose
mov eax,-1 ; close this program
mcall
int 0x40
noclose:
 
 
75,14 → 74,14
draw_window:
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
mcall
int 0x40
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,100*65536+200 ; [x start] *65536 + [x size]
mov ecx,100*65536+200 ; [y start] *65536 + [y size]
mov edx,0x13ffffff ; color of work area RRGGBB,8->color gl
mov edi,title ; WINDOW LABEL
mcall
mov edi,header ; WINDOW LABEL
int 0x40
 
call draw_slider_info
 
99,7 → 98,7
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
mcall
int 0x40
 
ret
 
114,12 → 113,12
mouse_info:
mov eax, 37 ;get mouse cordinates
mov ebx, 1 ;
mcall ;
int 0x40 ;
mov ecx, eax ;
push ecx ;
mov eax, 37 ;get mouse buttons
mov ebx, 2 ;
mcall ;
int 0x40 ;
cmp [mouseb], eax ;compare old mouse states to new states
jne redraw_mouse_info ;
cmp [mousey], cx ;
175,7 → 174,7
mov ebx, 0x00960028
mov ecx, 0x00240010
mov edx, 0x00ffffff
mcall
int 0x40
;Draw Color Box
xor edx, edx
movzx ecx,word [slider_1+12]
188,7 → 187,7
mov ebx, 0x00860035
mov ecx, 0x00590040
mov eax, 13
mcall
int 0x40
;draw current value of slider
mov ecx, edx
mov eax, 47
195,7 → 194,7
mov ebx, 0x00060100
mov esi, 0
mov edx, 0x009A0029
mcall
int 0x40
ret
 
 
268,7 → 267,7
mov ebx, [ebp] ;x start/width
mov ecx, [ebp+4] ;y start/height
mov edx, 0x002288DD ;color
mcall ;draw bar
int 0x40 ;draw bar
;Draw line for slide rail
mov eax, 38 ;draw vertical slide line
movzx ebx,word [ebp] ;x
282,7 → 281,7
add ecx, [ebp+6] ;y start
sub ecx, 10 ;
mov edx, 0x00 ;color
mcall ;
int 0x40 ;
;Draw slider box
movzx eax,word [ebp+4] ;height
sub eax, 20 ;
302,7 → 301,7
mov cx, [box_h] ;height
mov eax, 13 ;draw bar sys function
mov edx, 0x00 ;color
mcall ;draw slider box
int 0x40 ;draw slider box
pop edx
pop ecx
pop ebx
375,5 → 374,5
;**************************************************
 
; DATA AREA
title db 'Color Slider',0
header db 'Color Slider',0
I_END:
/programs/demos/cslide/trunk/build_en.bat
1,5 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm cslide.asm cslide
@erase lang.inc
@pause
/programs/demos/cslide/trunk/build_ru.bat
1,5 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm cslide.asm cslide
@erase lang.inc
@pause