Rev 6215 | Rev 7547 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6215 | Rev 6642 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ; END |
1 | ; END |
2 | ; KolibriOS Team 2005-2015 |
2 | ; KolibriOS Team 2005-2016 |
Line 3... | Line 3... | ||
3 | 3 | ||
Line 4... | Line 4... | ||
4 | fade equ 0 |
4 | fade equ 0 |
5 | 5 | ||
Line 21... | Line 21... | ||
21 | include '../../../dll.inc' |
21 | include '../../../dll.inc' |
22 | include '../../../develop/libraries/box_lib/load_lib.mac' |
22 | include '../../../develop/libraries/box_lib/load_lib.mac' |
23 | include '../../../develop/libraries/box_lib/trunk/box_lib.mac' |
23 | include '../../../develop/libraries/box_lib/trunk/box_lib.mac' |
24 | include '../../../gui_patterns.inc' |
24 | include '../../../gui_patterns.inc' |
25 | 25 | include "../../../string.inc" |
|
- | 26 | ||
- | 27 | WIN_W equ 440 |
|
- | 28 | WIN_H equ 200 |
|
- | 29 | BOT_PANEL_H equ 70 |
|
- | 30 | ||
- | 31 | CANCEL_BUTTON_ID equ 1+BT_HIDE |
|
- | 32 | HOME_BUTTON_ID equ 3 |
|
- | 33 | REBOOT_BUTTON_ID equ 2 |
|
- | 34 | POWEROFF_BUTTON_ID equ 4 |
|
- | 35 | ||
Line 26... | Line 36... | ||
26 | @use_library |
36 | @use_library |
Line 27... | Line 37... | ||
27 | 37 | ||
Line 175... | Line 185... | ||
175 | mcall ;eax=14 - get screen max x & max y |
185 | mcall ;eax=14 - get screen max x & max y |
176 | movzx ecx,ax |
186 | movzx ecx,ax |
177 | shr eax,17 |
187 | shr eax,17 |
178 | shl eax,16 |
188 | shl eax,16 |
179 | lea ebx,[eax-165 shl 16+332] |
189 | lea ebx,[eax-(WIN_W/2) shl 16+WIN_W-1] |
180 | shr ecx,1 |
190 | shr ecx,1 |
181 | shl ecx,16 |
191 | shl ecx,16 |
182 | lea ecx,[ecx-70 shl 16+132] |
192 | lea ecx,[ecx-(WIN_H/2) shl 16+WIN_H-1] |
183 | 193 | ||
Line 184... | Line 194... | ||
184 | xor eax,eax |
194 | xor eax,eax |
185 | mov edx, 0x01000000 |
195 | mov edx, 0x41000000 |
186 | mcall ;define and draw window |
196 | mcall ;define and draw window |
Line 187... | Line 197... | ||
187 | 197 | ||
188 | DrawRectangle 0,0,332,132,[color1] |
- | |
189 | mov al,13 |
- | |
190 | mcall ,<1,331>,<1,1>,[color2] |
- | |
191 | mcall ,<1,1>,<1,131> |
198 | DrawWideRectangle 0, 0, WIN_W, WIN_H, 2, 0xA3A7AA |
192 | mcall ,<2,330>,<2,130>, [color3] |
- | |
193 | - | ||
194 | mov al,8 |
199 | DrawBar 2, 2, WIN_W-4, WIN_H-BOT_PANEL_H-2, 0x202020 |
195 | mcall ,<16,144> ,<16,36>,4,[color4] ;eax=8 - draw buttons |
200 | DrawBar 2, WIN_H-BOT_PANEL_H-2, WIN_W-4, BOT_PANEL_H, 0x4B4B4B |
196 | mcall ,<170,144>, ,2,[color5] |
201 | WriteText 30, 27, 10010001b, 0xFFFfff, TEXT_TITLE |
197 | mcall , ,<62,36>,1,[color6] |
202 | WriteText 55, 70, 10010000b, 0xFFFfff, TEXT_RDSAVE1 |
Line 198... | Line -... | ||
198 | mcall ,<16,144> , ,3,[color7] |
- | |
199 | 203 | WriteText 55, 86, 10010000b, 0xFFFfff, TEXT_RDSAVE2 |
|
200 | mov al,4 |
204 | |
201 | mcall ,<28,19> ,[color8],label2 ;eax=4 - write text |
- | |
202 | mcall ,<28,65> , ,label3 |
- | |
Line 203... | Line 205... | ||
203 | mcall ,<64,40> ,[color9],label5 |
205 | DefineButton WIN_W-33, 2, 32, 20, CANCEL_BUTTON_ID, 0 |
204 | mcall ,<64,86> , ,label6 |
206 | WriteText WIN_W-23, 5, 10000001b, 0xFFFfff, TEXT_CANCEL |
Line -... | Line 207... | ||
- | 207 | ||
- | 208 | push dword check1 |
|
- | 209 | call [check_box_draw2] |
|
- | 210 | ||
- | 211 | macro EndButton x, bgcol, id, but_text, hotkey_text |
|
- | 212 | { |
|
- | 213 | buty equ WIN_H-60 |
|
- | 214 | butw equ 116 |
|
- | 215 | buth equ 43 |
|
- | 216 | DrawWideRectangle x-3, buty-3, butw+6, buth+6, 3, 0x202020 |
|
- | 217 | DefineButton x, buty, butw-1, buth-1, id, bgcol |
|
- | 218 | ; WriteTextBold -strlen(but_text)*8 + butw / 2 + x, buty+8, 10010000b, 0xFFFfff, but_text |
|
- | 219 | ; WriteText -strlen(but_text)*6 + butw / 2 + x, buty+26, 10000000b, 0xFFFfff, hotkey_text |
|
- | 220 | stdcall string.length, but_text |
|
- | 221 | mov ebx,eax |
|
- | 222 | imul ebx,4 |
|
- | 223 | neg ebx |
|
- | 224 | add ebx,butw / 2 + x |
|
- | 225 | shl ebx,16 |
|
- | 226 | add ebx,buty+8 |
|
- | 227 | mcall 4, , 10010000b shl 24 + 0xFFFfff, but_text |
|
- | 228 | add ebx,1 shl 16 |
|
- | 229 | mcall |
|
- | 230 | stdcall string.length, hotkey_text |
|
- | 231 | mov ebx,eax |
|
- | 232 | imul ebx,3 |
|
- | 233 | neg ebx |
|
- | 234 | add ebx,butw / 2 + x |
|
- | 235 | shl ebx,16 |
|
- | 236 | add ebx,buty+26 |
|
- | 237 | mcall 4, , 10000000b shl 24 + 0xFFFfff, hotkey_text |
|
- | 238 | } |
|
- | 239 | ||
205 | 240 | EndButton 20, 0x4E91C5, HOME_BUTTON_ID, TEXT_KERNEL, TEXT_HOME |
|
206 | push dword check1 |
241 | EndButton 160, 0x55C891, REBOOT_BUTTON_ID, TEXT_REBOOT, TEXT_ENTER |
207 | call [check_box_draw2] |
242 | EndButton 300, 0xC75C54, POWEROFF_BUTTON_ID, TEXT_OFF, TEXT_END |
208 | 243 | ||
209 | mov al,12 |
244 | mov al,12 |