Rev 7938 | Rev 9568 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
31 | halyavin | 1 | ; |
51 | mikedld | 2 | ; UNIFORM WINDOW COLOURS & SKIN |
31 | halyavin | 3 | ; |
4 | ; Compile with FASM for Menuet |
||
5 | ; |
||
6 | ; < russian edition by Ivan Poddubny > |
||
51 | mikedld | 7 | ; < skin selection by Mike Semenyako > |
3435 | mario79 | 8 | ;****************************************************************************** |
9 | ; last update: 01/04/2013 |
||
10 | ; written by: Marat Zakiyanov aka Mario79, aka Mario |
||
11 | ; changes: select colors with ColorDialog |
||
12 | ; some redesign of the look of the program |
||
13 | ;****************************************************************************** |
||
1611 | mario79 | 14 | ; last update: 10/09/2010 |
15 | ; written by: Marat Zakiyanov aka Mario79, aka Mario |
||
16 | ; changes: select path with OpenDialog |
||
31 | halyavin | 17 | ;****************************************************************************** |
3271 | mario79 | 18 | use32 |
19 | org 0 |
||
20 | db 'MENUET01' ; identifier |
||
21 | dd 1 ; header version |
||
22 | dd START ; start address |
||
3435 | mario79 | 23 | dd IM_END ; file size |
24 | dd I_END ; memory |
||
3271 | mario79 | 25 | dd stacktop ; stack pointer |
7937 | leency | 26 | dd app_param ; parameters |
3271 | mario79 | 27 | dd cur_dir_path ; path to file |
28 | |||
1611 | mario79 | 29 | include 'lang.inc' |
7639 | leency | 30 | include '../../../proc32.inc' |
1702 | Lrz | 31 | include '../../../config.inc' ;for nightbuild |
1611 | mario79 | 32 | include '../../../macros.inc' |
7937 | leency | 33 | include '../../../string.inc' |
7639 | leency | 34 | include '../../../dll.inc' |
1611 | mario79 | 35 | include 'kglobals.inc' |
36 | include 'unpacker.inc' |
||
37 | include '../../../develop/libraries/box_lib/load_lib.mac' |
||
38 | @use_library |
||
31 | halyavin | 39 | ;****************************************************************************** |
3435 | mario79 | 40 | ;-------------------------------------- |
51 | mikedld | 41 | struct SKIN_HEADER |
485 | heavyiron | 42 | ident dd ? |
43 | version dd ? |
||
44 | params dd ? |
||
45 | buttons dd ? |
||
46 | bitmaps dd ? |
||
51 | mikedld | 47 | ends |
3435 | mario79 | 48 | ;-------------------------------------- |
51 | mikedld | 49 | struct SKIN_PARAMS |
485 | heavyiron | 50 | skin_height dd ? |
51 | margin.right dw ? |
||
52 | margin.left dw ? |
||
53 | margin.bottom dw ? |
||
54 | margin.top dw ? |
||
55 | colors.inner dd ? |
||
56 | colors.outer dd ? |
||
57 | colors.frame dd ? |
||
58 | colors_1.inner dd ? |
||
59 | colors_1.outer dd ? |
||
60 | colors_1.frame dd ? |
||
61 | dtp.size dd ? |
||
62 | dtp.data db 40 dup (?) |
||
51 | mikedld | 63 | ends |
3435 | mario79 | 64 | ;-------------------------------------- |
51 | mikedld | 65 | struct SKIN_BUTTONS |
485 | heavyiron | 66 | type dd ? |
67 | pos: |
||
68 | left dw ? |
||
69 | top dw ? |
||
70 | size: |
||
8992 | leency | 71 | w dw ? |
485 | heavyiron | 72 | height dw ? |
51 | mikedld | 73 | ends |
3435 | mario79 | 74 | ;-------------------------------------- |
51 | mikedld | 75 | struct SKIN_BITMAPS |
485 | heavyiron | 76 | kind dw ? |
77 | type dw ? |
||
78 | _data dd ? |
||
51 | mikedld | 79 | ends |
3435 | mario79 | 80 | ;-------------------------------------- |
81 | frame_1: |
||
82 | .x = 5 |
||
8992 | leency | 83 | .y = area.y + area.height + 20 |
84 | .w = area.w + 217 |
||
85 | .height = 65 |
||
3435 | mario79 | 86 | ;-------------------------------------- |
87 | frame_2: |
||
8992 | leency | 88 | .x = frame_1.x |
89 | .y = frame_1.y + frame_1.height + 20 |
||
90 | .w = frame_1.w |
||
91 | .height = frame_1.height |
||
1611 | mario79 | 92 | ;--------------------------------------------------------------------- |
8992 | leency | 93 | win: |
94 | .w = frame_2.w + frame_2.x + frame_2.x + 9 |
||
95 | .h = frame_2.y + frame_2.height + 10 |
||
96 | ;--------------------------------------------------------------------- |
||
3271 | mario79 | 97 | START: ; start of execution |
98 | ;--------------------------------------------------------------------- |
||
1611 | mario79 | 99 | mcall 68,11 |
100 | |||
101 | test eax,eax |
||
102 | jz close |
||
103 | |||
7639 | leency | 104 | stdcall dll.Load,LibIniImportTable |
1611 | mario79 | 105 | load_libraries l_libs_start,end_l_libs |
106 | |||
107 | ;if return code =-1 then exit, else nornary work |
||
108 | inc eax |
||
109 | test eax,eax |
||
110 | jz close |
||
111 | ;--------------------------------------------------------------------- |
||
7937 | leency | 112 | ; set default pathes |
7938 | leency | 113 | stdcall string.copy, default_skin, skin_info |
114 | stdcall string.copy, default_dtp, dtp_name |
||
1611 | mario79 | 115 | ;--------------------------------------------------------------------- |
7937 | leency | 116 | ; check app param |
117 | stdcall string.length, app_param |
||
118 | add eax, app_param |
||
119 | mov ecx, [eax-4] |
||
120 | cmp ecx, '.skn' |
||
121 | je load_skin_from_param |
||
122 | cmp ecx, '.dtp' |
||
123 | jne no_param |
||
124 | |||
125 | load_dtp_from_param: |
||
7938 | leency | 126 | stdcall string.copy, app_param, dtp_name |
7937 | leency | 127 | call load_dtp_file.1 |
128 | jmp skin_path_ready |
||
129 | |||
130 | load_skin_from_param: |
||
7938 | leency | 131 | stdcall string.copy, app_param, skin_info |
7937 | leency | 132 | call load_skin_file.2 |
133 | jmp skin_path_ready |
||
134 | |||
135 | no_param: |
||
136 | mcall 48,3,color_table,4*10 ; get current colors |
||
137 | call load_skin_file.2 |
||
138 | |||
1611 | mario79 | 139 | skin_path_ready: |
140 | ;--------------------------------------------------------------------- |
||
141 | ;OpenDialog initialisation |
||
3271 | mario79 | 142 | push dword OpenDialog_data |
143 | call [OpenDialog_Init] |
||
1611 | mario79 | 144 | |
3271 | mario79 | 145 | push dword OpenDialog_data2 |
146 | call [OpenDialog_Init] |
||
3435 | mario79 | 147 | ;-------------------------------------------------------------------- |
148 | ;init_ColorDialog ColorDialog_data |
||
149 | push dword ColorDialog_data |
||
150 | call [ColorDialog_Init] |
||
151 | ;-------------------------------------------------------------------- |
||
1611 | mario79 | 152 | ; prepare for PathShow |
153 | push dword PathShow_data_1 |
||
154 | call [PathShow_prepare] |
||
155 | |||
156 | push dword PathShow_data_2 |
||
157 | call [PathShow_prepare] |
||
158 | ;--------------------------------------------------------------------- |
||
31 | halyavin | 159 | red: |
3271 | mario79 | 160 | call draw_window ; at first, draw the window |
161 | ;--------------------------------------------------------------------- |
||
31 | halyavin | 162 | still: |
3435 | mario79 | 163 | mcall 10 ; wait here for event |
31 | halyavin | 164 | |
3271 | mario79 | 165 | dec eax ; redraw request ? |
166 | jz red |
||
3435 | mario79 | 167 | |
3271 | mario79 | 168 | dec eax ; key in buffer ? |
169 | jz key |
||
3435 | mario79 | 170 | |
3271 | mario79 | 171 | dec eax ; button in buffer ? |
172 | jz button |
||
31 | halyavin | 173 | |
3271 | mario79 | 174 | jmp still |
175 | ;--------------------------------------------------------------------- |
||
176 | key: ; key |
||
177 | mcall 2 ; just read it and ignore |
||
178 | jmp still |
||
179 | ;--------------------------------------------------------------------- |
||
180 | button: ; button |
||
181 | mcall 17 ; get id |
||
31 | halyavin | 182 | |
3271 | mario79 | 183 | cmp ah,12 ; load file |
184 | jne no_load |
||
31 | halyavin | 185 | |
7937 | leency | 186 | call load_dtp_file |
3271 | mario79 | 187 | call draw_window |
188 | jmp still |
||
189 | ;-------------------------------------- |
||
190 | no_load: |
||
191 | cmp ah,13 ; save file |
||
192 | jne no_save |
||
31 | halyavin | 193 | |
3271 | mario79 | 194 | call save_file |
195 | jmp still |
||
196 | ;-------------------------------------- |
||
197 | no_save: |
||
198 | cmp ah,14 ; set 3d buttons |
||
199 | jne no_3d |
||
31 | halyavin | 200 | |
3271 | mario79 | 201 | mcall 48,1,1 |
7639 | leency | 202 | invoke ini_set_int, aIni, aSectionSkn, aButtonStyle, 1 |
3271 | mario79 | 203 | jmp doapply |
204 | ;-------------------------------------- |
||
205 | no_3d: |
||
206 | cmp ah,15 ; set flat buttons |
||
207 | jne no_flat |
||
31 | halyavin | 208 | |
7639 | leency | 209 | invoke ini_set_int, aIni, aSectionSkn, aButtonStyle, 0 |
3271 | mario79 | 210 | mcall 48, 1, 0 |
211 | ;-------------------------------------- |
||
484 | diamond | 212 | doapply: |
3271 | mario79 | 213 | mcall 48, 0, 0 |
214 | jmp still |
||
215 | ;-------------------------------------- |
||
216 | no_flat: |
||
217 | cmp ah,16 ; apply |
||
218 | jne no_apply |
||
219 | ;-------------------------------------- |
||
220 | apply_direct: |
||
221 | mcall 48,2,color_table,10*4 |
||
222 | jmp doapply |
||
223 | ;-------------------------------------- |
||
224 | no_apply: |
||
225 | cmp ah,17 ; load skin file |
||
226 | jne no_load_skin |
||
31 | halyavin | 227 | |
3271 | mario79 | 228 | call load_skin_file |
229 | call draw_window |
||
230 | jmp still |
||
231 | ;-------------------------------------- |
||
232 | no_load_skin: |
||
233 | cmp ah,18 ; apply skin |
||
234 | jne no_apply_skin |
||
31 | halyavin | 235 | |
3271 | mario79 | 236 | cmp [skin_info],0 |
237 | je no_apply_skin |
||
51 | mikedld | 238 | |
3271 | mario79 | 239 | mcall 48,8,skin_info |
240 | call draw_window |
||
241 | jmp still |
||
242 | ;-------------------------------------- |
||
243 | no_apply_skin: |
||
244 | cmp ah,31 |
||
245 | jb no_new_colour |
||
51 | mikedld | 246 | |
3271 | mario79 | 247 | cmp ah,41 |
248 | jg no_new_colour |
||
249 | |||
3435 | mario79 | 250 | ;--------------------------------------------------------------------- |
251 | .start_ColorDialog: |
||
252 | push dword ColorDialog_data |
||
253 | call [ColorDialog_Start] |
||
254 | ; 2 - use another method/not found program |
||
255 | cmp [ColorDialog_data.status],2 |
||
256 | je still |
||
257 | ; 1 - OK, color selected |
||
258 | cmp [ColorDialog_data.status],1 |
||
259 | jne still |
||
260 | ;--------------------------------------------------------------------- |
||
261 | |||
3271 | mario79 | 262 | shr eax,8 |
263 | sub eax,31 |
||
264 | shl eax,2 |
||
3435 | mario79 | 265 | mov ebx,[ColorDialog_data.color] |
266 | and ebx,0xffffff ; temporary for ColorDialog!!!!!!!!!! |
||
3271 | mario79 | 267 | mov [eax+color_table],ebx |
268 | cmp dword[not_packed_area+SKIN_HEADER.ident],'SKIN' |
||
269 | jne @f |
||
31 | halyavin | 270 | |
3271 | mario79 | 271 | mov edi,[not_packed_area+SKIN_HEADER.params] |
272 | mov dword[edi+not_packed_area+SKIN_PARAMS.dtp.data+eax],ebx |
||
273 | call draw_skin |
||
274 | ;-------------------------------------- |
||
275 | @@: |
||
276 | call draw_colours |
||
277 | jmp still |
||
278 | ;-------------------------------------- |
||
279 | no_new_colour: |
||
280 | cmp ah,1 ; terminate |
||
281 | jnz noid1 |
||
282 | ;-------------------------------------- |
||
1611 | mario79 | 283 | close: |
3271 | mario79 | 284 | or eax,-1 |
285 | mcall |
||
286 | ;-------------------------------------- |
||
287 | noid1: |
||
288 | jmp still |
||
289 | ;--------------------------------------------------------------------- |
||
7937 | leency | 290 | load_dtp_file: |
1611 | mario79 | 291 | ;--------------------------------------------------------------------- |
292 | ; invoke OpenDialog |
||
293 | mov [OpenDialog_data.type],dword 0 |
||
3271 | mario79 | 294 | push dword OpenDialog_data |
295 | call [OpenDialog_Start] |
||
1611 | mario79 | 296 | cmp [OpenDialog_data.status],1 |
297 | je .1 |
||
298 | ret |
||
299 | .1: |
||
300 | ; prepare for PathShow |
||
301 | push dword PathShow_data_1 |
||
302 | call [PathShow_prepare] |
||
31 | halyavin | 303 | |
1611 | mario79 | 304 | call draw_PathShow |
305 | ;--------------------------------------------------------------------- |
||
7937 | leency | 306 | .2: |
3271 | mario79 | 307 | xor eax, eax |
308 | mov ebx, read_info |
||
309 | mov dword [ebx], eax ; subfunction: read |
||
310 | mov dword [ebx+4], eax ; offset (low dword) |
||
311 | mov dword [ebx+8], eax ; offset (high dword) |
||
312 | mov dword [ebx+12], 40 ; read colors file: 4*10 bytes |
||
313 | mov dword [ebx+16], color_table ; address |
||
314 | mcall 70 |
||
315 | ret |
||
1611 | mario79 | 316 | ;--------------------------------------------------------------------- |
317 | load_skin_file: |
||
318 | ;--------------------------------------------------------------------- |
||
319 | ; invoke OpenDialog |
||
3271 | mario79 | 320 | push dword OpenDialog_data2 |
321 | call [OpenDialog_Start] |
||
1611 | mario79 | 322 | cmp [OpenDialog_data2.status],1 |
323 | je .1 |
||
324 | ret |
||
325 | .1: |
||
326 | ; prepare for PathShow |
||
327 | push dword PathShow_data_2 |
||
328 | call [PathShow_prepare] |
||
31 | halyavin | 329 | |
1611 | mario79 | 330 | call draw_PathShow |
331 | ;--------------------------------------------------------------------- |
||
332 | .2: |
||
3271 | mario79 | 333 | xor eax,eax |
334 | mov ebx,read_info2 |
||
335 | mov dword [ebx], eax ; subfunction: read |
||
336 | mov dword [ebx+4], eax ; offset (low dword) |
||
337 | mov dword [ebx+8], eax ; offset (high dword) |
||
338 | mov dword [ebx+12], 32*1024 ; read: max 32 KBytes |
||
339 | mov dword [ebx+16], file_load_area ; address |
||
340 | mcall 70 |
||
31 | halyavin | 341 | |
3271 | mario79 | 342 | mov esi, file_load_area |
179 | mikedld | 343 | |
3271 | mario79 | 344 | cmp dword [esi], 'KPCK' |
345 | jnz notpacked |
||
31 | halyavin | 346 | |
3271 | mario79 | 347 | cmp dword [esi+4], 32*1024 ; max 32 KBytes |
348 | ja doret |
||
51 | mikedld | 349 | |
3271 | mario79 | 350 | push unpack_area |
351 | push esi |
||
352 | call unpack |
||
353 | mov esi,unpack_area |
||
354 | ;-------------------------------------- |
||
355 | notpacked: |
||
356 | cmp [esi+SKIN_HEADER.ident],dword 'SKIN' |
||
357 | jne doret |
||
51 | mikedld | 358 | |
3271 | mario79 | 359 | mov edi,not_packed_area |
360 | mov ecx,0x8000/4 |
||
361 | rep movsd |
||
51 | mikedld | 362 | |
3271 | mario79 | 363 | mov ebp,not_packed_area |
364 | mov esi,[ebp+SKIN_HEADER.params] |
||
365 | add esi,ebp |
||
366 | lea esi,[esi+SKIN_PARAMS.dtp.data] |
||
367 | mov edi,color_table |
||
368 | mov ecx,10 |
||
369 | rep movsd |
||
370 | ;-------------------------------------- |
||
371 | doret: |
||
372 | ret |
||
1611 | mario79 | 373 | ;--------------------------------------------------------------------- |
374 | save_file: |
||
375 | ;--------------------------------------------------------------------- |
||
376 | ; invoke OpenDialog |
||
377 | mov [OpenDialog_data.type],dword 1 |
||
3271 | mario79 | 378 | push dword OpenDialog_data |
379 | call [OpenDialog_Start] |
||
1611 | mario79 | 380 | cmp [OpenDialog_data.status],1 |
381 | je .1 |
||
382 | ret |
||
383 | .1: |
||
384 | ; prepare for PathShow |
||
385 | push dword PathShow_data_1 |
||
386 | call [PathShow_prepare] |
||
31 | halyavin | 387 | |
1611 | mario79 | 388 | call draw_PathShow |
389 | ;--------------------------------------------------------------------- |
||
3271 | mario79 | 390 | xor eax,eax |
391 | mov ebx,write_info |
||
392 | mov [ebx],dword 2 ; subfunction: write |
||
393 | and [ebx+4],eax ; (reserved) |
||
394 | and [ebx+8],eax ; (reserved) |
||
395 | mov [ebx+12],dword 10*4 ; bytes to write |
||
396 | mov [ebx+16],dword color_table ; address |
||
397 | mcall 70 |
||
398 | ret |
||
1611 | mario79 | 399 | ;--------------------------------------------------------------------- |
3435 | mario79 | 400 | draw_button_row: |
8992 | leency | 401 | mov edx,0x40000000 + 31 ; BUTTON ROW |
402 | mov ebx,(area.w+18)*65536+29 |
||
403 | mov ecx,9*65536+15 |
||
3435 | mario79 | 404 | mov eax,8 |
405 | ;----------------------------------- |
||
406 | .newb: |
||
407 | mcall |
||
8992 | leency | 408 | add ecx,22*65536 |
3435 | mario79 | 409 | inc edx |
8992 | leency | 410 | cmp edx,0x40000000 + 40 |
3435 | mario79 | 411 | jbe .newb |
3271 | mario79 | 412 | ret |
3435 | mario79 | 413 | ;--------------------------------------------------------------------- |
414 | draw_button_row_of_texts: |
||
8992 | leency | 415 | mov ebx,(area.w+49)*65536+9 ; ROW OF TEXTS |
3435 | mario79 | 416 | mov ecx,[w_work_text] |
8992 | leency | 417 | add ecx,0x10000000 |
3435 | mario79 | 418 | mov edx,text |
419 | mov esi,32 |
||
420 | mov eax,4 |
||
421 | ;----------------------------------- |
||
422 | .newline: |
||
423 | mcall |
||
8992 | leency | 424 | add ebx,22 |
3435 | mario79 | 425 | add edx,32 |
426 | cmp [edx],byte 'x' |
||
427 | jne .newline |
||
428 | ret |
||
429 | ;--------------------------------------------------------------------- |
||
31 | halyavin | 430 | draw_colours: |
3271 | mario79 | 431 | pusha |
432 | mov esi,color_table |
||
8992 | leency | 433 | mov ebx,(area.w+19)*65536+28 |
3435 | mario79 | 434 | mov ecx,10*65536+14 |
435 | mov eax,13 |
||
3472 | mario79 | 436 | mov [frame_data.draw_text_flag],dword 0 |
3271 | mario79 | 437 | ;-------------------------------------- |
438 | newcol: |
||
439 | mov edx,[esi] |
||
3435 | mario79 | 440 | mcall |
3472 | mario79 | 441 | |
442 | push ebx ecx |
||
443 | |||
444 | sub ebx,2 shl 16 |
||
445 | add bx,4 |
||
446 | sub ecx,2 shl 16 |
||
447 | add cx,4 |
||
448 | |||
449 | mov [frame_data.x],ebx |
||
450 | mov [frame_data.y],ecx |
||
451 | |||
452 | push dword frame_data |
||
453 | call [Frame_draw] |
||
454 | |||
455 | pop ecx ebx |
||
456 | |||
8992 | leency | 457 | add ecx,22*65536 |
3271 | mario79 | 458 | add esi,4 |
3435 | mario79 | 459 | cmp esi,color_table+4*9 |
3271 | mario79 | 460 | jbe newcol |
31 | halyavin | 461 | |
3271 | mario79 | 462 | popa |
463 | ret |
||
2068 | mario79 | 464 | ;---------------------------------------------------------------------- |
1611 | mario79 | 465 | draw_PathShow: |
466 | pusha |
||
8992 | leency | 467 | mcall 13, |
468 | mcall 13, |
||
1611 | mario79 | 469 | ; draw for PathShow |
470 | push dword PathShow_data_1 |
||
471 | call [PathShow_draw] |
||
472 | |||
473 | push dword PathShow_data_2 |
||
474 | call [PathShow_draw] |
||
475 | popa |
||
476 | ret |
||
477 | ;--------------------------------------------------------------------- |
||
31 | halyavin | 478 | ; ********************************************* |
479 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
||
480 | ; ********************************************* |
||
481 | draw_window: |
||
2068 | mario79 | 482 | mcall 12,1 |
483 | mcall 48,3,app_colours,10*4 |
||
484 | mcall 14 |
||
3435 | mario79 | 485 | mcall 48,4 |
486 | mov [current_skin_high],eax |
||
2068 | mario79 | 487 | ; DRAW WINDOW |
488 | xor eax,eax ; function 0 : define and draw window |
||
489 | xor esi,esi |
||
490 | mov edx,[w_work] ; color of work area RRGGBB,8->color |
||
3435 | mario79 | 491 | or edx,0x34000000 |
8992 | leency | 492 | mov ecx,50 shl 16 + win.h |
3435 | mario79 | 493 | add ecx,[current_skin_high] |
8992 | leency | 494 | mcall ,<110, win.w>,,,,title |
31 | halyavin | 495 | |
2068 | mario79 | 496 | mcall 9,procinfo,-1 |
497 | |||
498 | mov eax,[procinfo+70] ;status of window |
||
499 | test eax,100b |
||
500 | jne .end |
||
3271 | mario79 | 501 | |
3435 | mario79 | 502 | ;if lang eq ru |
51 | mikedld | 503 | load_w = (5*2+6*9) |
504 | save_w = (5*2+6*9) |
||
505 | flat_w = (5*2+6*7) |
||
506 | apply_w = (5*2+6*9) |
||
3435 | mario79 | 507 | ;else |
508 | ; load_w = (5*2+6*6) |
||
509 | ; save_w = (5*2+6*8) |
||
510 | ; flat_w = (5*2+6*4) |
||
511 | ; apply_w = (5*2+6*7) |
||
512 | ;end if |
||
513 | ;----------------------------------- |
||
514 | ; select color DTP frame |
||
515 | ; LOAD BUTTON ; button 12 |
||
8992 | leency | 516 | mcall 8, |
2068 | mario79 | 517 | ; SAVE BUTTON |
518 | add ebx,(load_w+2)*65536-load_w+save_w |
||
519 | inc edx |
||
3435 | mario79 | 520 | mcall ; button 13 |
521 | ; APPLY BUTTON |
||
8992 | leency | 522 | mov ebx,(frame_1.x + frame_1.w - apply_w - 15)*65536+apply_w |
3435 | mario79 | 523 | mcall 8,,,16 ; button 17 |
524 | ; select color DTP button text |
||
8992 | leency | 525 | mcall 4, |
3435 | mario79 | 526 | ;----------------------------------- |
527 | ; select skin frame |
||
528 | ; LOAD SKIN BUTTON ; button 17 |
||
8992 | leency | 529 | mcall 8, |
2068 | mario79 | 530 | ; 3D |
3435 | mario79 | 531 | mov ebx,(frame_2.x+155)*65536+34 |
532 | mcall ,,,14 ; button 14 |
||
2068 | mario79 | 533 | ; FLAT |
3435 | mario79 | 534 | add ebx,36*65536-34+flat_w |
2068 | mario79 | 535 | inc edx |
3435 | mario79 | 536 | mcall ; button 15 |
2068 | mario79 | 537 | ; APPLY SKIN BUTTON |
8992 | leency | 538 | mov ebx,(frame_2.x + frame_2.w - apply_w -15)*65536+apply_w |
3435 | mario79 | 539 | mcall ,,,18 ; button 18 |
540 | ; select skin button text |
||
8992 | leency | 541 | mcall 4, |
3435 | mario79 | 542 | ;----------------------------------- |
543 | call draw_button_row |
||
544 | call draw_button_row_of_texts |
||
545 | call draw_colours |
||
2068 | mario79 | 546 | ;----------------------------------- |
8992 | leency | 547 | mov [frame_data.x],dword frame_1.x shl 16+frame_1.w |
3472 | mario79 | 548 | mov [frame_data.y],dword frame_1.y shl 16+frame_1.height |
549 | mov [frame_data.text_pointer],dword select_dtp_text |
||
550 | mov eax,[w_work] |
||
551 | mov [frame_data.font_backgr_color],eax |
||
552 | mov eax,[w_work_text] |
||
553 | mov [frame_data.font_color],eax |
||
554 | mov [frame_data.draw_text_flag],dword 1 |
||
555 | |||
556 | push dword frame_data |
||
557 | call [Frame_draw] |
||
558 | ;----------------------------------- |
||
8992 | leency | 559 | mov [frame_data.x],dword frame_2.x shl 16+frame_2.w |
3472 | mario79 | 560 | mov [frame_data.y],dword frame_2.y shl 16+frame_2.height |
561 | mov [frame_data.text_pointer],dword select_skin_text |
||
31 | halyavin | 562 | |
3472 | mario79 | 563 | push dword frame_data |
564 | call [Frame_draw] |
||
2068 | mario79 | 565 | ;----------------------------------- |
3435 | mario79 | 566 | call draw_PathShow |
567 | ;----------------------------------- |
||
2068 | mario79 | 568 | cmp dword[not_packed_area+SKIN_HEADER.ident],'SKIN' |
569 | jne @f |
||
570 | call draw_skin |
||
571 | @@: |
||
572 | .end: |
||
573 | mcall 12,2 |
||
574 | ret |
||
3435 | mario79 | 575 | ;----------------------------------------------------------------------------- |
576 | include 'drawskin.inc' |
||
577 | ;----------------------------------------------------------------------------- |
||
31 | halyavin | 578 | ; DATA AREA |
3435 | mario79 | 579 | ;----------------------------------------------------------------------------- |
580 | include 'idata.inc' |
||
581 | ;----------------------------------------------------------------------------- |
||
582 | IM_END: |
||
583 | ;----------------------------------------------------------------------------- |
||
584 | include 'udata.inc' |
||
585 | ;----------------------------------------------------------------------------- |
||
31 | halyavin | 586 | I_END: |
3435 | mario79 | 587 | ;-----------------------------------------------------------------------------110,>>> |