mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-03 13:51:58 +03:00
ea1a682e65
git-svn-id: svn://kolibrios.org@807 a494cfbc-eb01-0410-851d-a64ba20cac60
125 lines
5.5 KiB
NASM
125 lines
5.5 KiB
NASM
;Ž¯â¨¬¨§¨à®¢ ë© ª®¬¯®¥â CheckBox (ˆáå®¤ë© ¢ ਠ⠮â Maxxxx32)
|
||
;Ž¯â¨¬¨§¨à®¢ ¢ë¢®¤ áâப¨, ¤¯¨á¨ ¤«ï CheckBox'a + ⥯¥àì ¯à¨ ¯à®¢¥àª¥ ¥ ;¯à®¨á室¨â ¯®¤áç¥â ª®«-¢ ᨬ¢®«®¢ ¢ áâப¥
|
||
;Ž¯â¨¬¨§ æ¨ï ª®¬ ¤.
|
||
;21.02.2007 ¬®¤¥à¨§ æ¨ï ¨ ¯®¤¤¥à¦ª ¤¢ãå à §ëå ¢ ਠ⮢ á ¨á¯®«ì§®¢ ¨¥¬ á¨á 梥⮢ ¨ áâ ன á奬®©
|
||
;19.02.2007 ®¡é¥¥ ã«ãç襨¥ ª®¤ , 㬥ì襨¥ à §¬¥à ¨ ¨á¯®«ì§®¢ ¨¥ á¨á⥬ëå 梥⮢ ¤«ï ®â®¡à ¦¥¨ï checkbox
|
||
;22.08.2006 ¯à®¨§¢¥¤¥ ®¯â¨¬¨§ æ¨ï ª®¬ ¤, ¯à¨ïâë ¢® ¢¨¬ ¨¥ § ¬¥ç ¨ï DIAMOND' .
|
||
;<Lrz> - ’¥¯«®¢ €«¥ªá¥© www.lrz.land.ru
|
||
|
||
;§ £®«®¢®ª ¯à¨«®¦¥¨ï
|
||
use32 ; âà á«ïâ®à, ¨á¯®«ì§ãî騩 32 à §àï¤ëå ª®¬ ¤ë
|
||
org 0x0 ; ¡ §®¢ë© ¤à¥á ª®¤ , ¢á¥£¤ 0x0
|
||
db 'MENUET01' ; ¨¤¥â¨ä¨ª â®à ¨á¯®«ï¥¬®£® ä ©« (8 ¡ ©â)
|
||
dd 0x1 ; ¢¥àá¨ï ä®à¬ â § £®«®¢ª ¨á¯®«ï¥¬®£® ä ©«
|
||
dd start ; ¤à¥á, ª®â®àë© á¨á⥬ ¯¥à¥¤ ñâ ã¯à ¢«¥¨¥
|
||
; ¯®á«¥ § £à㧪¨ ¯à¨«®¦¥¨ï ¢ ¯ ¬ïâì
|
||
dd i_end ; à §¬¥à ¯à¨«®¦¥¨ï
|
||
dd i_end ; Ž¡ê¥¬ ¨á¯®«ì§ã¥¬®© ¯ ¬ïâ¨, ¤«ï á⥪ ®â¢¥¤¥¬ 0å100 ¡ ©â ¨ ¢ë஢¨¬ £à¨æã 4 ¡ ©â
|
||
dd i_end ; à ᯮ«®¦¨¬ ¯®§¨æ¨î á⥪ ¢ ®¡« á⨠¯ ¬ïâ¨, áà §ã § ⥫®¬ ¯à®£à ¬¬ë. ‚¥àè¨ á⥪ ¢ ¤¨ ¯ §®¥ ¯ ¬ïâ¨, 㪠§ ®¬ ¢ëè¥
|
||
dd 0x0,0x0 ; 㪠§ ⥫ì áâபã á ¯ à ¬¥âà ¬¨.
|
||
; ¥á«¨ ¯®á«¥ § ¯ã᪠¥à ¢® ã«î, ¯à¨«®¦¥¨¥ ¡ë«®
|
||
; § ¯ã饮 á ¯ à ¬¥âà ¬¨ ¨§ ª®¬ ¤®© áâப¨
|
||
|
||
; 㪠§ ⥫ì áâபã, ¢ ª®â®àãî § ¯¨á ¯ãâì,
|
||
; ®âªã¤ § ¯ã饮 ¯à¨«®¦¥¨¥
|
||
;------------------
|
||
include '..\..\..\..\macros.inc'
|
||
include 'check.inc' ;¢ª«îç¨âì ä ©« check.inc
|
||
; version_ch ;¥®¡å®¤¨¬ë© ¬ ªà®á ¤«ï ¢ª«î票ï "áâ ன" ¢¥àᨨ check_box
|
||
version_ch1 ;¥®¡å®¤¨¬ë© ¬ ªà®á ¤«ï ¢ª«î票ï new ¢¥àᨨ check_box1
|
||
;<3B>¥¤®¯ãá⨬® ¢ª«î票¥ ¤¢ãå ¬ ªà®á¢® version_ch1 ¨ version_ch - ®¨ ¢§ ¬®¨áª«îç îâ ¤àã£- ¤à£ã£ .
|
||
use_check_box ;¨á¯®«ì§ãï ¬ ªà®áë ¢¥á⨠¯à®æ¥¤ãàë ¤«ï à¨á®¢ ¨ï 祪 ¡®ªá
|
||
;Ž¡« áâì ª®¤
|
||
align 4
|
||
start: ;’®çª ¢å®¤ ¢ ¯à®£à ¬¬ã
|
||
mov eax,48 ;¯®«ãç¨âì á¨áâ¥¬ë¥ æ¢¥â
|
||
mov ebx,3
|
||
mov ecx,sc
|
||
mov edx,sizeof.system_colors
|
||
mcall
|
||
|
||
mov eax,40 ;ãáâ ®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩
|
||
mov ebx,0x25 ;á¨á⥬ ¡ã¤¥â ॠ£¨à®¢ âì ⮫쪮 á®®¡é¥¨¥ ® ¯¥à¥à¨á®¢ª¥, ¦ â ª®¯ª , ®¯à¥¤¥«ñ ï à ¥¥, ᮡë⨥ ®â ¬ëè¨ (çâ®-â® á«ã稫®áì - ¦ ⨥ ª®¯ªã ¬ëè¨ ¨«¨ ¯¥à¥¬¥é¥¨¥; á¡à áë¢ ¥âáï ¯à¨ ¯à®ç⥨¨)
|
||
mcall
|
||
red_win:
|
||
call draw_window ;¯¥à¢® ç «ì® ¥®¡å®¤¨¬® à¨á®¢ âì ®ª®
|
||
still: ;®á®¢®© ®¡à ¡®â稪
|
||
mov eax,10 ;Ž¦¨¤ âì ᮡëâ¨ï
|
||
mcall ;®¦¨¤ âì ᮡë⨥ ¢ â¥ç¥¨¥ 2 ¬¨««¨á¥ªã¤
|
||
|
||
cmp al,0x1 ;¥á«¨ ¨§¬¥¨«®áì ¯®«®¦¥¨¥ ®ª
|
||
jz red_win
|
||
cmp al,0x3 ;¥á«¨ ¦ â ª®¯ª â® ¯¥à¥©â¨
|
||
jz button
|
||
mouse_check_boxes check_boxes,check_boxes_end ;¯à®¢¥àª 祪 ¡®ªá
|
||
jmp still ;¥á«¨ ¨ç¥£® ¨§ ¯¥à¥ç¨á«¥®£® ⮠ᮢ ¢ 横«
|
||
button:
|
||
or eax,-1 ;¢ eax,-1 - 5 ,¡ ©â®¢ ã á ¦¥ ⮫쪮 3 ¢ë©â¨
|
||
mcall ;¤ «¥¥ ¢ë¯®«ï¥âáï ¢ë室 ¨§ ¯à®£à ¬¬ë
|
||
|
||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||
draw_window: ;à¨á®¢ ¨¥ ®ª ¯à¨«®¦¥¨ï
|
||
mov eax,12 ;¢ ॣ¨áâà ¢¥á⨠§ 票¥ = 12
|
||
mov ebx,1 ;¯à¨á¢®¨âì 1
|
||
mcall
|
||
|
||
xor eax,eax ;®¡ã«¨âì eax
|
||
mov ebx,50*65536+180 ;[ª®®à¤¨ â ¯® ®á¨ x]*65536 + [à §¬¥à ¯® ®á¨ x]
|
||
mov ecx,30*65536+100 ;[ª®®à¤¨ â ¯® ®á¨ y]*65536 + [à §¬¥à ¯® ®á¨ y]
|
||
mov edx,[sc.work] ; color of work area RRGGBB,8->color gl
|
||
or edx,0xb3000000
|
||
mov edi,hed
|
||
mcall ; à¨á®¢ âì ®ª® ¯à¨«®¦¥¨ï
|
||
|
||
draw_check_boxes check_boxes,check_boxes_end ;à¨á®¢ ¨¥ 祪¡®ªá®¢
|
||
|
||
mov eax,12 ;”ãªæ¨ï 12 - ç âì/§ ª®ç¨âì ¯¥à¥à¨á®¢ªã ®ª .
|
||
mov ebx,2 ;<3B>®¤äãªæ¨ï 2 - § ª®ç¨âì ¯¥à¥à¨á®¢ªã ®ª .
|
||
mcall
|
||
ret
|
||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||
;DATA ¤ ë¥
|
||
;”®à¬ â ¤ ëå 祪 ¡®ªá :
|
||
;10 - ª®®à¤¨ â 祪 ¡®ªá ¯® å
|
||
;30 - ª®®à¤¨ â 祪 ¡®ªá ¯® ã
|
||
;0 - 梥⠧ «¨¢ª¨ ¢ãâਠ祪 ¡®ªá
|
||
;0xfffffff - 梥â à ¬ª¨ 祪 ¡®ªá ¥á«¨ 㦮 â ª ¨á¯®«ì§ãîâáï á¨â¥¬ë¥ 梥â
|
||
;0 - 梥â ⥪áâ ¤¯¨á¨ ¥á«¨ 㦮 â ª ¨á¯®«ì§ãîâáï á¨â¥¬ë¥ 梥â
|
||
;ch_text.1 - 㪠§ ⥫ì ç «® áâப¨
|
||
;ch_text.e1-ch_text.1 - ¤«¨ áâப¨
|
||
;
|
||
align 4
|
||
check_boxes:
|
||
;ch1 check_box 10,15,0xffffff,0,0,ch_text.1,ch_text.e1-ch_text.1,ch_flag_en
|
||
;ch2 check_box 10,30,0xffffff,0,0,ch_text.2,ch_text.e2-ch_text.2
|
||
;ch3 check_box 10,45,0xffffff,0,0,ch_text.3,ch_text.e3-ch_text.3
|
||
|
||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||
;DATA ¤ ë¥ ¤«ï check_box1 - ¨á¯®«ì§ã¥â á¨áâ¥¬ë¥ æ¢¥â
|
||
;”®à¬ â ¤ ëå 祪 ¡®ªá :
|
||
;10 - ª®®à¤¨ â 祪 ¡®ªá ¯® å
|
||
;30 - ª®®à¤¨ â 祪 ¡®ªá ¯® ã
|
||
;ch_text.1 - 㪠§ ⥫ì ç «® áâப¨
|
||
;ch_text.e1-ch_text.1 - ¤«¨ áâப¨
|
||
|
||
;
|
||
ch1 check_box1 10,15,ch_text.1,ch_text.e1-ch_text.1,ch_flag_en
|
||
ch2 check_box1 10,30,ch_text.2,ch_text.e2-ch_text.2
|
||
ch3 check_box1 10,45,ch_text.3,ch_text.e3-ch_text.3
|
||
check_boxes_end:
|
||
|
||
ch_text: ;ᮯ஢®¦¤ î騩 ⥪áâ ¤«ï 祪 ¡®ªá®¢
|
||
.1 db 'Check_Box #1'
|
||
.e1:
|
||
.2 db 'Check_Box #2'
|
||
.e2:
|
||
.3 db 'Check_Box #3'
|
||
.e3:
|
||
|
||
hed db 'Checkbox [21.02.2007]',0 ;§ £®«®¢®ª ¯à¨«®¦¥¨ï
|
||
align 16
|
||
sc system_colors
|
||
rb 0x100
|
||
i_end: ;ª®¥æ ª®¤ |