kolibrios-fun/programs/develop/examples/radiobutton/trunk/optionbox.asm

130 lines
5.5 KiB
NASM
Raw Normal View History

;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> OptionBox (<28><EFBFBD><E1ADAE><EFBFBD> <20><> Checkbox)
;<3B><><EFBFBD><E0AEAC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0ADAE><EFBFBD> Maxxxx32, Diamond, Heavyiron <20> <20><><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC><EFBFBD>⠬, <20> <20><> <20>ணࠬ<E0AEA3><E0A0AC><EFBFBD>, <20><><EFBFBD>
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
;21.02.2007 <20><><EFBFBD><EFBFBD><EFBFBD><E0ADA8><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><><E0A0A7><EFBFBD> <20><><EFBFBD><20> <20><EFBFBD><EFBFBD><ECA7AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> 梥⮢ <20> <20><><EFBFBD><20><EFBFBD><E5A5AC>
;19.02.2007 <20><><20><><EFBFBD><EFBFBD><EFBFBD><E8A5AD> <20><><EFBFBD><EFBFBD>, 㬥<><E3ACA5><EFBFBD><E8A5AD><><E0A0A7><EFBFBD><EFBFBD> <20> <20><EFBFBD><EFBFBD><ECA7AE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2A5AC><EFBFBD> 梥⮢ <20><><EFBFBD> <20>⮡ࠦ<E2AEA1><E0A0A6><EFBFBD><EFBFBD> optionkbox
;16.02.2007 <20><><EFBFBD><EFBFBD><><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;<Lrz> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ᥩ www.lrz.land.ru
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
use32 ; <20><EFBFBD><E0A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD>騩 32 ࠧ<><EFBFBD><EFA4AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
org 0x0 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><EFBFBD><E1A5A3> 0x0
db 'MENUET01' ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E4A8AA><EFBFBD><EFBFBD> <20><EFBFBD><E1AFAE><EFBFBD><EFA5AC><EFBFBD><><E4A0A9> (8 <20><><EFBFBD><EFBFBD>)
dd 0x1 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0ACA0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E1AFAE><EFBFBD><EFA5AC><EFBFBD><><E4A0A9>
dd start ; <20><><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><E0A5A4><EFBFBD> <20><><EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
; <20><><20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
dd i_end ; ࠧ<><E0A0A7><EFBFBD> <20><EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
dd (i_end+0x100) and not 3 ; <20><><20><EFBFBD><E1AFAE><EFBFBD><EFBFBD><E3A5AC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><EFBFBD> <20><EFBFBD><E2A2A5><EFBFBD> 0<>100 <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><E0AEA2><EFBFBD> <20><> <20><EFBFBD><E0ADA8> 4 <20><><EFBFBD><EFBFBD><EFBFBD>
dd (i_end+0x100) and not 3 ; <20><><EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><EFBFBD> <20><><><E2A5AB> <20>ணࠬ<E0AEA3><E0A0AC>. <20><><EFBFBD><EFBFBD> <20><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 㪠<><E3AAA0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
dd 0x0,0x0 ; 㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD> <20> <20><><EFBFBD><E0A0AC><EFBFBD>.
; <20><20><><20><><EFBFBD><EFBFBD><20><><><E0A0A2> <20><><EFBFBD><EFBFBD>, <20><EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>
; <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><E0A0AC><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
; 㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD>, <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD>,
; <20><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;------------------
include '..\..\..\..\macros.inc'
include 'optionbox.inc' ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><> opeck.inc
version_op ;<3B><><EFBFBD><E0A8A0>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><20><EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E6A2A5>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><ECA7AE><EFBFBD>
; version_op1 ;梥<><E6A2A5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
use_option_box ;<3B><EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E6A5A4><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> optionbox
align 16
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
start: ;<3B><><20><EFBFBD> <20> <20>ணࠬ<E0AEA3><E0A0AC>
mov eax,48 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2A5AC><EFBFBD><><E6A2A5>
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
mcall
mov eax,40 ;<3B><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>
mov ebx,0x25 ;<3B><><EFBFBD><EFBFBD> <20><EFBFBD><><E0A5A0><EFBFBD><E0AEA2><EFBFBD> ⮫쪮 <20><><><EFBFBD><E9A5AD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1AEA2>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><E0A5A4>񭭠<EFBFBD><><E0A0AD>, ᮡ<><20><> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD>-<2D><> <20><><EFBFBD><EFBFBD><E7A8AB><EFBFBD> - <20><><EFBFBD><EFBFBD><20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><E9A5AD>; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBA2A0><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E2A5AD>)
mcall
red_win:
call draw_window ;<3B><><EFBFBD><E0A2AE>砫쭮 <20><><EFBFBD><EFBFBD><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2><EFBFBD> <20><><EFBFBD><EFBFBD>
still: ;<3B><EFBFBD><E1ADAE><EFBFBD><EFBFBD> <20><><EFBFBD><E0A0A1>
mov eax,10 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1AEA1><EFBFBD><EFBFBD>
mcall ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><20> <20><><EFBFBD><E7A5AD> 2 <20><><EFBFBD><EFBFBD><EFBFBD>ᥪ㭤
cmp al,0x1 ;<3B><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
jz red_win
cmp al,0x3 ;<3B><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E0A5A9>
jz button
mouse_option_boxes option_boxes,option_boxes_end ;<3B><EFBFBD>ઠ 祪 <20><><EFBFBD><EFBFBD><EFBFBD>
jmp still ;<3B><20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1ABA5><EFBFBD><EFBFBD><EFBFBD> <20><><><E1ADAE> <20><>
button:
; mov eax,17 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E4A8AA><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
; mcall
; test ah,ah ;<3B><20> ah 0, <20><> <20><><EFBFBD><E0A5A9> <20><> <20><><EFBFBD><E0A0A1>稪 ᮡ<>⨩ still
; jz still
or eax,-1 ;<3B> eax,-1 - 5 ,<2C><><EFBFBD><20> <20><><EFBFBD> <20><> ⮫쪮 3 <20><><EFBFBD><EFBFBD><EFBFBD>
mcall ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><EBAFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><20><> <20>ணࠬ<E0AEA3><E0A0AC>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
draw_window: ;<3B><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov eax,12 ;<3B><><E0A5A3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD> = 12
mov ebx,1 ;<3B><><EFBFBD><EFBFBD><E1A2AE><EFBFBD> 1
mcall
xor eax,eax ;<3B><><EFBFBD><EFBFBD><E3ABA8> eax
mov ebx,50*65536+180 ;[<5B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> x]*65536 + [ࠧ<><E0A0A7><EFBFBD> <20><> <20><><EFBFBD> x]
mov ecx,30*65536+200 ;[<5B><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> y]*65536 + [ࠧ<><E0A0A7><EFBFBD> <20><> <20><><EFBFBD> y]
mov edx,[sc.work] ; color of work area RRGGBB,8->color gl
or edx,0xb3000000
mov edi,hed
mcall ;<3B><><EFBFBD><EFBFBD><EFBFBD><E1AEA2><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
draw_option_boxes option_boxes,option_boxes_end ;<3B><><EFBFBD><E1AEA2><EFBFBD><EFBFBD><><E7A5AA><EFBFBD>
mov eax,12 ;<3B><EFBFBD><E3ADAA><EFBFBD> 12 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1AEA2> <20><><EFBFBD><EFBFBD>.
mov ebx,2 ;<3B><><EFBFBD><EFBFBD><EFBFBD><E3ADAA><EFBFBD> 2 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1AEA2> <20><><EFBFBD><EFBFBD>.
mcall
ret
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;DATA <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>:
;10 - <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20>
;30 - <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20>
;0
;0 - 梥<><><E0A0AC><20><><EFBFBD><EFBFBD><EFBFBD>
;0 - 梥<><><E2A5AA><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;op_text.1 - 㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD>
;option_group1 - <20><><EFBFBD> <20><EFBFBD><E0A8A7><EFBFBD> <20><><EFBFBD>, <20>.<2E>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A0A1><EFBFBD><EBA2A0> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><20><> optibox
;op_text.e1-op_text.1 - <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
;
align 16
option_boxes:
;op1 option_box1 option_group1,10,15,op_text.1,op_text.e1-op_text.1
;op2 option_box1 option_group1,10,30,op_text.2,op_text.e2-op_text.2
;op3 option_box1 option_group1,10,45,op_text.3,op_text.e3-op_text.3
;op11 option_box1 option_group2,10,80,op_text.1,op_text.e1-op_text.1
;op12 option_box1 option_group2,10,95,op_text.2,op_text.e2-op_text.2
;op13 option_box1 option_group2,10,110,op_text.3,op_text.e3-op_text.3
;
;struc option_box point_gr,left,top,color,border_color,text_color,text,text_length
op1 option_box option_group1,10,15,0xffffff,0,0,op_text.1,op_text.e1-op_text.1
op2 option_box option_group1,10,30,0xFFFFFF,0,0,op_text.2,op_text.e2-op_text.2
op3 option_box option_group1,10,45,0xffffff,0,0,op_text.3,op_text.e3-op_text.3
op11 option_box option_group2,10,80,0xffffff,0,0,op_text.1,op_text.e1-op_text.1
op12 option_box option_group2,10,95,0xffffff,0,0,op_text.2,op_text.e2-op_text.2
op13 option_box option_group2,10,110,0xffffff,0,0,op_text.3,op_text.e3-op_text.3
option_boxes_end:
op_text: ; <20><><EFBFBD><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD>騩 ⥪<><E2A5AA> <20><><EFBFBD><20><><EFBFBD>
.1 db 'Option_Box #1'
.e1:
.2 db 'Option_Box #2'
.e2:
.3 db 'Option_Box #3'
.e3:
option_group1 dd op1 ;㪠<><E3AAA0><EFBFBD>, <20><><EFBFBD> <20>⮡ࠦ<E2AEA1><E0A0A6><EFBFBD><EFBFBD><EFBFBD> <20><><><EFBFBD><E7A0AD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><EBA2AE><EFBFBD><EFBFBD><EFBFBD>
option_group2 dd op11 ;<3B><EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
hed db 'Optionbox [21.02.2007]',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
sc system_colors
i_end: ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>