Subversion Repositories Kolibri OS

Rev

Rev 131 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 131 Rev 180
Line 46... Line 46...
46
vrr_00:
46
vrr_00:
47
    call get_vert_rate
47
    call get_vert_rate
48
    mov eax,[currvm]
48
    mov eax,[currvm]
49
    mov [oldvm],eax
49
    mov [oldvm],eax
50
    call get_pid
50
    call get_pid
-
 
51
red:
51
    call draw_window  ; at first, draw the window
52
    call draw_window  ; at first, draw the window
Line 52... Line 53...
52
   
53
   
Line 53... Line 54...
53
still:
54
still:
Line 62... Line 63...
62
    cmp  eax,3   ; button in buffer ?
63
    cmp  eax,3   ; button in buffer ?
63
    je  button
64
    je  button
64
    call get_pid
65
    call get_pid
65
    jmp  still
66
    jmp  still
Line 66... Line -...
66
   
-
 
67
  red:    ; redraw
-
 
68
    call draw_window
-
 
69
    jmp  still
-
 
70
   
67
      
71
  key:    ; key
68
  key:    ; key
72
    mov  eax,2   ; just read it
69
    mov  al,2   ; just read it
73
    int  0x40
70
    int  0x40
74
    cmp ah,'1'
71
    cmp ah,'1'
75
    jne key_loc_00
72
    jne key_loc_00
76
    call safekey
73
    call safekey
Line 141... Line 138...
141
    xor ax,ax
138
    xor ax,ax
142
    mov [vmselect],ax
139
    mov [vmselect],ax
143
    jmp red
140
    jmp red
Line 144... Line 141...
144
   
141
   
145
button:   ; button
142
button:   ; button
146
    mov  eax,17   ; get id
143
    mov  al,17   ; get id
Line 147... Line 144...
147
    int  0x40
144
    int  0x40
148
   
145
   
149
    cmp  ah,1   ; button id=1 ?
146
    cmp  ah,1   ; button id=1 ?
Line 201... Line 198...
201
   
198
   
202
       ; DRAW WINDOW
199
       ; DRAW WINDOW
203
    mov  eax,0      ; function 0 : define and draw window
200
    mov  eax,0      ; function 0 : define and draw window
204
    mov  ebx,100*65536+400    ; [x start] *65536 + [x size]
201
    mov  ebx,100*65536+400    ; [x start] *65536 + [x size]
205
    mov  ecx,100*65536+200    ; [y start] *65536 + [y size]
202
    mov  ecx,100*65536+200    ; [y start] *65536 + [y size]
206
    mov  edx,0x020020C0;0x00000040 ; color of work area RRGGBB,8->color glide
-
 
207
    mov  esi,0x805080d0     ; color of grab bar RRGGBB,8->color glide
-
 
208
    mov  edi,0x00ffffff     ; color of frames RRGGBB
-
 
209
    int  0x40
-
 
210
   
-
 
211
       ; WINDOW LABEL
-
 
212
     call print_my_title
-
 
213
   
-
 
214
       ; CLOSE BUTTON
-
 
215
    mov  eax,8      ; function 8 : define and draw button
-
 
216
    mov  ebx,(400-19)*65536+12    ; [x start] *65536 + [x size]
-
 
217
    mov  ecx,5*65536+12     ; [y start] *65536 + [y size]
203
    mov  edx,0x130020C0;0x00000040 ; color of work area RRGGBB,8->color glide
218
    mov  edx,1      ; button id
-
 
219
    mov  esi,0x5599cc     ; button color RRGGBB
204
    mov  edi,header
Line 220... Line 205...
220
    int  0x40
205
    int  0x40
221
   
206
   
222
       ; BUTTONS
207
       ; BUTTONS
223
    xor eax,eax
-
 
224
    mov edx,eax
208
    mov eax,8
225
    mov al,8
209
    mov edx,0
226
    mov ebx,330*65536+20
210
    mov ebx,330*65536+20
-
 
211
    mov ecx,84*65536+48
227
    mov ecx,84*65536+48
212
    mov dl,2
228
    mov dl,2
213
    mov  esi,0x5599cc     ; button color RRGGBB
229
    int 40h               ; Button '+'Width
214
    int 40h               ; Button '+'Width
230
    add ebx,30*65536
215
    add ebx,30*65536
231
    mov dl,3
216
    mov dl,3
Line 847... Line 832...
847
        mov edx,00ff0000h
832
        mov edx,00ff0000h
848
        call draw_rect
833
        call draw_rect
849
rs_loc_00:
834
rs_loc_00:
850
        retn
835
        retn
Line 851... Line -...
851
   
-
 
852
print_my_title:
-
 
853
        pusha
-
 
854
        xor eax,eax
-
 
855
        mov ecx,eax
-
 
856
        mov cl,labellen-labelt
-
 
857
        mov al,4
-
 
858
        mov edx,labelt
-
 
859
        mov ebx,8*65536+8
-
 
860
        mov edi,00ff0000h
-
 
861
        xor esi,esi
-
 
862
        inc esi
-
 
863
pmt_loc_00:
-
 
864
        push ecx
-
 
865
        mov ecx,edi
-
 
866
        int 40h
-
 
867
        inc edx
-
 
868
        sub edi,4*65536
-
 
869
        add edi,4*256
-
 
870
        add ebx,6*65536
-
 
871
        pop ecx
-
 
872
        loop pmt_loc_00
-
 
873
        popa
-
 
874
        retn
-
 
875
   
-
 
876
   
836
   
877
draw_face:
837
draw_face:
878
        call draw_table
838
        call draw_table
879
;
839
;
880
;
840
;
Line 966... Line 926...
966
warning_window:
926
warning_window:
967
        mov  eax,12      ; function 12:tell os about windowdraw
927
        mov  eax,12      ; function 12:tell os about windowdraw
968
        mov  ebx,1      ; 1, start of draw
928
        mov  ebx,1      ; 1, start of draw
969
        int  0x40
929
        int  0x40
970
   ; DRAW WARNING WINDOW
930
   ; DRAW WARNING WINDOW
971
        mov  eax,0      ; function 0 : define and draw window
931
        xor  eax,eax      ; function 0 : define and draw window
972
;        mov  ebx,100*65536+400    ; [x start] *65536 + [x size]
-
 
973
        mov ebx,[oldX]
932
        mov ebx,[oldX]
974
        shr ebx,1
933
        shr ebx,1
975
        sub ebx,200
934
        sub ebx,200
976
        shl ebx,16
935
        shl ebx,16
977
        mov bx,400
936
        mov bx,400
Line 979... Line 938...
979
        mov ecx,[oldY]
938
        mov ecx,[oldY]
980
        shr ecx,1
939
        shr ecx,1
981
        sub ecx,100
940
        sub ecx,100
982
        shl ecx,16
941
        shl ecx,16
983
        mov cx,200
942
        mov cx,200
984
        mov  edx,0x02808080     ; color of work area RRGGBB,8->color glide
943
        mov  edx,0x13808080     ; color of work area RRGGBB,8->color glide
985
        mov  esi,0x40300010     ; color of grab bar RRGGBB,8->color glide
-
 
986
        mov  edi,0x00ff0000     ; color of frames RRGGBB
-
 
987
        int  0x40
944
        mov  edi,header
988
   ; WARNING WINDOW LABEL
-
 
989
        call print_my_title
-
 
990
   ; CLOSE BUTTON
-
 
991
        mov  eax,8      ; function 8 : define and draw button
-
 
992
        mov  ebx,(200-36)*65536+72    ; [x start] *65536 + [x size]
-
 
993
        mov  ecx,(160-9)*65536+18     ; [y start] *65536 + [y size]
-
 
994
        mov  edx,1      ; button id
-
 
995
        mov  esi,0x00800010     ; button color RRGGBB
-
 
996
        int  0x40
945
        int  0x40
-
 
946
 
997
   ; WARNING TEXT
947
   ; WARNING TEXT
998
        mov  eax,4      ; function 4 : write text to window
948
        mov  eax,4      ; function 4 : write text to window
999
            mov  ebx,(200-(len_warn00/2)*6)*65536+60    ; [x start] *65536 + [y
949
        mov  ebx,(200-(len_warn00/2)*6)*65536+60    ; [x start] *65536 + [y
1000
   ;]
950
   ;]
1001
        mov  ecx,0xf0ff0000     ; color of text RRGGBB
951
        mov  ecx,0xf0ff0000     ; color of text RRGGBB
Line 1093... Line 1043...
1093
;_m1        dw 0,0,0,0,0
1043
;_m1        dw 0,0,0,0,0
1094
;_m2        dw 0,0,0,0,0
1044
;_m2        dw 0,0,0,0,0
1095
;_m3        dw 0,0,0,0,0
1045
;_m3        dw 0,0,0,0,0
1096
;_m4        dw 0,0,0,0,0
1046
;_m4        dw 0,0,0,0,0
Line 1097... Line -...
1097
   
-
 
1098
labelt:
1047
   
1099
     db   'Vertical Refresh Rate, ver.2.0,  Copileft 2003 ;) TRANS'
-
 
Line 1100... Line 1048...
1100
labellen:
1048
header     db   'Vertical Refresh Rate v2.0 (C) 2003 TRANS',0
1101
   
1049
   
1102
_m1280x1024 db '1280x1024'
1050
_m1280x1024 db '1280x1024'
1103
_m1024x768  db '1024x768 '
1051
_m1024x768  db '1024x768 '