Rev 1829 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1829 | Rev 2108 | ||
---|---|---|---|
Line 20... | Line 20... | ||
20 | 20 | ||
Line 21... | Line 21... | ||
21 | call draw_window ; at first, draw the window |
21 | call draw_window ; at first, draw the window |
Line 22... | Line 22... | ||
22 | 22 | ||
23 | still: |
- | |
Line 24... | Line 23... | ||
24 | 23 | still: |
|
25 | mov eax,10 ; wait here for event |
24 | |
26 | int 0x40 |
25 | mcall 10 ; wait here for event |
27 | 26 | ||
Line 49... | Line 48... | ||
49 | mov eax,17 |
48 | mov eax,17 |
50 | int 0x40 |
49 | int 0x40 |
Line 51... | Line 50... | ||
51 | 50 | ||
52 | cmp ah,1 ; button id=1 ? |
51 | cmp ah,1 ; button id=1 ? |
53 | jnz noclose |
52 | jnz noclose |
54 | mov eax,0xffffffff ; close this program |
53 | mov eax,-1 ; close this program |
55 | int 0x40 |
54 | int 0x40 |
Line 56... | Line 55... | ||
56 | noclose: |
55 | noclose: |
57 | 56 | ||
Line 102... | Line 101... | ||
102 | ; ********************************************* |
101 | ; ********************************************* |
Line 103... | Line 102... | ||
103 | 102 | ||
Line 104... | Line -... | ||
104 | - | ||
105 | draw_window: |
- | |
106 | - | ||
107 | mov eax,12 ; function 12:tell os about windowdraw |
- | |
108 | mov ebx,1 ; 1, start of draw |
- | |
109 | int 0x40 |
- | |
110 | - | ||
111 | ; DRAW WINDOW |
- | |
112 | mov eax,0 ; function 0 : define and draw window |
- | |
113 | mov ebx,100*65536+300 ; [x start] *65536 + [x size] |
- | |
114 | mov ecx,100*65536+240 ; [y start] *65536 + [y size] |
- | |
115 | mov edx,0x02ffffff ; color of work area RRGGBB |
- | |
116 | mov esi,0x80597799 ; color of grab bar RRGGBB,8->color glide |
- | |
117 | mov edi,0x00597799 ; color of frames RRGGBB |
- | |
118 | int 0x40 |
- | |
119 | - | ||
120 | ; WINDOW LABEL |
103 | |
121 | mov eax,4 ; function 4 : write text to window |
- | |
122 | mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
- | |
123 | mov ecx,0x00ffffff ; color of text RRGGBB |
- | |
Line 124... | Line -... | ||
124 | mov edx,tlabel ; pointer to text beginning |
- | |
125 | mov esi,labellen-tlabel ; text length |
- | |
126 | int 0x40 |
- | |
127 | - | ||
128 | ; CLOSE BUTTON |
- | |
129 | mov eax,8 ; function 8 : define and draw button |
- | |
130 | mov ebx,(300-19)*65536+12 ; [x start] *65536 + [x size] |
104 | draw_window: |
Line -... | Line 105... | ||
- | 105 | ||
Line 131... | Line 106... | ||
131 | mov ecx,5*65536+12 ; [y start] *65536 + [y size] |
106 | ;mcall 48, 3, sys_colors, 40 |
132 | mov edx,1 ; button id |
107 | |
133 | mov esi,0x5977bb ; button color RRGGBB |
108 | mcall 12, 1 |
134 | int 0x40 |
109 | |
135 | 110 | mcall 0, <200,292>, <200,230>, 0x14FFFFFF,,tlabel |
|
136 | 111 | ||
137 | mov eax,8 ; function 8 : define and draw button |
112 | mov eax,8 ; function 8 : define and draw button |
138 | mov ebx,25*65536+9 ; [x start] *65536 + [x size] |
113 | mov ebx,32*65536+10 ; [x start] *65536 + [x size] |
139 | mov ecx,74*65536+9 ; [y start] *65536 + [y size] |
114 | mov ecx,75*65536+10 ; [y start] *65536 + [y size] |
140 | mov edx,2 ; button id |
115 | mov edx,2 ; button id |
141 | mov esi,0x5977bb ; button color RRGGBB |
116 | mov esi,0x6888B8 ; button color RRGGBB |
Line 142... | Line 117... | ||
142 | newb: |
117 | newb: |
143 | int 0x40 |
118 | int 0x40 |
144 | add ecx,20*65536 |
119 | add ecx,20*65536 |
145 | inc edx |
120 | inc edx |
146 | cmp edx,9 |
121 | cmp edx,9 |
147 | jb newb |
122 | jb newb |
148 | 123 | ||
Line 158... | Line 133... | ||
158 | add edx,40 |
133 | add edx,40 |
159 | cmp [edx],byte 'x' |
134 | cmp [edx],byte 'x' |
160 | jnz newline |
135 | jnz newline |
Line 161... | Line 136... | ||
161 | 136 | ||
162 | - | ||
163 | mov eax,12 ; function 12:tell os about windowdraw |
- | |
Line 164... | Line -... | ||
164 | mov ebx,2 ; 2, end of draw |
- | |
Line -... | Line 137... | ||
- | 137 | ||
Line 165... | Line 138... | ||
165 | int 0x40 |
138 | mcall 12, 2 ; function 12:tell os about windowdraw |
Line 166... | Line 139... | ||
166 | 139 | ||
Line 167... | Line 140... | ||
167 | ret |
140 | |
168 | 141 | ret |
|
169 | 142 | ||
170 | ; DATA AREA |
143 | ; DATA AREA |
171 | 144 | ||
172 | 145 | ||
173 | text: |
146 | text: |
174 | 147 | ||
Line 192... | Line 165... | ||
192 | db 'x ' |
165 | db 'x ' |
Line 193... | Line 166... | ||
193 | 166 | ||
194 | 167 | ||
195 | 168 | ||
Line 196... | Line 169... | ||
196 | tlabel: |
169 | tlabel: |