Subversion Repositories Kolibri OS

Rev

Rev 2382 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2382 Rev 2540
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 2382 $
8
$Revision $
Line 9... Line 9...
9
 
9
 
-
 
10
 
10
 
11
include "skindata.inc"
11
include "skindata.inc"
12
 
12
 
13
;skin_data = 0x00778000
13
;skin_data = 0x00778000
14
;------------------------------------------------------------------------------
14
 
15
align 4
15
read_skin_file:
16
read_skin_file:
16
        stdcall load_file, ebx
17
        stdcall load_file, ebx
17
        test    eax, eax
18
        test    eax, eax
18
        jz      .notfound
19
        jz      .notfound
19
        cmp     dword [eax], 'SKIN'
20
        cmp     dword [eax], 'SKIN'
-
 
21
        jnz     .noskin
-
 
22
        cmp     ebx, 32*1024
20
        jnz     .noskin
23
        jb      @f
21
        cmp     ebx, 32*1024
24
        mov     ebx, 32*1024
22
        jb      @f
25
;--------------------------------------
23
        mov     ebx, 32*1024
26
align 4
24
@@:
27
@@:
Line 30... Line 33...
30
        stdcall kernel_free, eax
33
        stdcall kernel_free, eax
Line 31... Line 34...
31
 
34
 
32
        call    parse_skin_data
35
        call    parse_skin_data
33
        xor     eax, eax
36
        xor     eax, eax
-
 
37
        ret
-
 
38
;--------------------------------------
34
        ret
39
align 4
35
.notfound:
40
.notfound:
36
        xor     eax, eax
41
        xor     eax, eax
37
        inc     eax
42
        inc     eax
-
 
43
        ret
-
 
44
;--------------------------------------
38
        ret
45
align 4
39
.noskin:
46
.noskin:
40
        stdcall kernel_free, eax
47
        stdcall kernel_free, eax
41
        push    2
48
        push    2
42
        pop     eax
49
        pop     eax
43
        ret
-
 
-
 
50
        ret
44
 
51
;------------------------------------------------------------------------------
45
struct  SKIN_HEADER
52
struct  SKIN_HEADER
46
        ident           dd ?
53
        ident           dd ?
47
        version         dd ?
54
        version         dd ?
48
        params          dd ?
55
        params          dd ?
Line 79... Line 86...
79
struct  SKIN_BITMAPS
86
struct  SKIN_BITMAPS
80
        kind    dw ?
87
        kind    dw ?
81
        type    dw ?
88
        type    dw ?
82
        data    dd ?
89
        data    dd ?
83
ends
90
ends
-
 
91
;------------------------------------------------------------------------------
84
 
92
align 4
85
load_default_skin:
93
load_default_skin:
86
        mov     [_skinh], 22
94
        mov     [_skinh], 22
87
        mov     ebx, _skin_file_default
95
        mov     ebx, _skin_file_default
88
        call    read_skin_file
96
        call    read_skin_file
89
        ret
97
        ret
-
 
98
;------------------------------------------------------------------------------
90
 
99
align 4
91
parse_skin_data:
100
parse_skin_data:
92
        mov     ebp, skin_data
101
        mov     ebp, skin_data
93
        cmp     [ebp+SKIN_HEADER.ident], 'SKIN'
102
        cmp     [ebp+SKIN_HEADER.ident], 'SKIN'
94
        jne     .exit
103
        jne     .exit
Line 125... Line 134...
125
        mov     eax, dword[ebx+SKIN_PARAMS.margin.bottom]
134
        mov     eax, dword[ebx+SKIN_PARAMS.margin.bottom]
126
        mov     dword[_skinmargins+4], eax
135
        mov     dword[_skinmargins+4], eax
Line 127... Line 136...
127
 
136
 
128
        mov     ebx, [ebp+SKIN_HEADER.bitmaps]
137
        mov     ebx, [ebp+SKIN_HEADER.bitmaps]
-
 
138
        add     ebx, skin_data
-
 
139
;--------------------------------------
129
        add     ebx, skin_data
140
align 4
130
  .lp1:
141
.lp1:
131
        cmp     dword[ebx], 0
142
        cmp     dword[ebx], 0
132
        je      .end_bitmaps
143
        je      .end_bitmaps
133
        movzx   eax, [ebx+SKIN_BITMAPS.kind]
144
        movzx   eax, [ebx+SKIN_BITMAPS.kind]
Line 137... Line 148...
137
        xor     eax, eax
148
        xor     eax, eax
138
        mov     edx, skin_active.left.data
149
        mov     edx, skin_active.left.data
139
        or      ecx, ecx
150
        or      ecx, ecx
140
        jnz     @f
151
        jnz     @f
141
        mov     edx, skin_inactive.left.data
152
        mov     edx, skin_inactive.left.data
-
 
153
;--------------------------------------
-
 
154
align 4
142
    @@:
155
@@:
143
        jmp     .next_bitmap
156
        jmp     .next_bitmap
-
 
157
;--------------------------------------
-
 
158
align 4
144
  .not_left:
159
.not_left:
145
        dec     eax
160
        dec     eax
146
        jnz     .not_oper
161
        jnz     .not_oper
147
        mov     esi, [ebx+SKIN_BITMAPS.data]
162
        mov     esi, [ebx+SKIN_BITMAPS.data]
148
        add     esi, skin_data
163
        add     esi, skin_data
Line 150... Line 165...
150
        neg     eax
165
        neg     eax
151
        mov     edx, skin_active.oper.data
166
        mov     edx, skin_active.oper.data
152
        or      ecx, ecx
167
        or      ecx, ecx
153
        jnz     @f
168
        jnz     @f
154
        mov     edx, skin_inactive.oper.data
169
        mov     edx, skin_inactive.oper.data
-
 
170
;--------------------------------------
-
 
171
align 4
155
    @@:
172
@@:
156
        jmp     .next_bitmap
173
        jmp     .next_bitmap
-
 
174
;--------------------------------------
-
 
175
align 4
157
  .not_oper:
176
.not_oper:
158
        dec     eax
177
        dec     eax
159
        jnz     .not_base
178
        jnz     .not_base
160
        mov     eax, [skin_active.left.width]
179
        mov     eax, [skin_active.left.width]
161
        mov     edx, skin_active.base.data
180
        mov     edx, skin_active.base.data
162
        or      ecx, ecx
181
        or      ecx, ecx
163
        jnz     @f
182
        jnz     @f
164
        mov     eax, [skin_inactive.left.width]
183
        mov     eax, [skin_inactive.left.width]
165
        mov     edx, skin_inactive.base.data
184
        mov     edx, skin_inactive.base.data
-
 
185
;--------------------------------------
-
 
186
align 4
166
    @@:
187
@@:
167
        jmp     .next_bitmap
188
        jmp     .next_bitmap
-
 
189
;--------------------------------------
-
 
190
align 4
168
  .not_base:
191
.not_base:
169
        add     ebx, 8
192
        add     ebx, 8
170
        jmp     .lp1
193
        jmp     .lp1
-
 
194
;--------------------------------------
-
 
195
align 4
171
  .next_bitmap:
196
.next_bitmap:
172
        mov     ecx, [ebx+SKIN_BITMAPS.data]
197
        mov     ecx, [ebx+SKIN_BITMAPS.data]
173
        add     ecx, skin_data
198
        add     ecx, skin_data
174
        mov     [edx+4], eax
199
        mov     [edx+4], eax
175
        mov     eax, [ecx+0]
200
        mov     eax, [ecx+0]
176
        mov     [edx+8], eax
201
        mov     [edx+8], eax
177
        add     ecx, 8
202
        add     ecx, 8
178
        mov     [edx+0], ecx
203
        mov     [edx+0], ecx
179
        add     ebx, 8
204
        add     ebx, 8
180
        jmp     .lp1
205
        jmp     .lp1
-
 
206
;--------------------------------------
-
 
207
align 4
181
  .end_bitmaps:
208
.end_bitmaps:
182
 
-
 
183
        mov     ebx, [ebp+SKIN_HEADER.buttons]
209
        mov     ebx, [ebp+SKIN_HEADER.buttons]
184
        add     ebx, skin_data
210
        add     ebx, skin_data
-
 
211
;--------------------------------------
-
 
212
align 4
185
  .lp2:
213
.lp2:
186
        cmp     dword[ebx], 0
214
        cmp     dword[ebx], 0
187
        je      .end_buttons
215
        je      .end_buttons
188
        mov     eax, [ebx+SKIN_BUTTONS.type]
216
        mov     eax, [ebx+SKIN_BUTTONS.type]
189
        dec     eax
217
        dec     eax
190
        jnz     .not_close
218
        jnz     .not_close
191
        mov     edx, skin_btn_close
219
        mov     edx, skin_btn_close
192
        jmp     .next_button
220
        jmp     .next_button
-
 
221
;--------------------------------------
-
 
222
align 4
193
  .not_close:
223
.not_close:
194
        dec     eax
224
        dec     eax
195
        jnz     .not_minimize
225
        jnz     .not_minimize
196
        mov     edx, skin_btn_minimize
226
        mov     edx, skin_btn_minimize
197
        jmp     .next_button
227
        jmp     .next_button
-
 
228
;--------------------------------------
-
 
229
align 4
198
  .not_minimize:
230
.not_minimize:
199
        add     ebx, 12
231
        add     ebx, 12
200
        jmp     .lp2
232
        jmp     .lp2
-
 
233
;--------------------------------------
-
 
234
align 4
201
  .next_button:
235
.next_button:
202
        movsx   eax, [ebx+SKIN_BUTTONS.left]
236
        movsx   eax, [ebx+SKIN_BUTTONS.left]
203
        mov     [edx+SKIN_BUTTON.left], eax
237
        mov     [edx+SKIN_BUTTON.left], eax
204
        movsx   eax, [ebx+SKIN_BUTTONS.top]
238
        movsx   eax, [ebx+SKIN_BUTTONS.top]
205
        mov     [edx+SKIN_BUTTON.top], eax
239
        mov     [edx+SKIN_BUTTON.top], eax
Line 207... Line 241...
207
        mov     [edx+SKIN_BUTTON.width], eax
241
        mov     [edx+SKIN_BUTTON.width], eax
208
        movsx   eax, [ebx+SKIN_BUTTONS.height]
242
        movsx   eax, [ebx+SKIN_BUTTONS.height]
209
        mov     [edx+SKIN_BUTTON.height], eax
243
        mov     [edx+SKIN_BUTTON.height], eax
210
        add     ebx, 12
244
        add     ebx, 12
211
        jmp     .lp2
245
        jmp     .lp2
-
 
246
;--------------------------------------
-
 
247
align 4
212
  .end_buttons:
248
.end_buttons:
213
 
-
 
214
  .exit:
249
.exit:
215
        ret
250
        ret
216
 
-
 
217
sys_putimage_with_check:
-
 
218
        or      ebx, ebx
-
 
219
        jz      @f
-
 
220
        call    sys_putimage.forced
251
;------------------------------------------------------------------------------
221
    @@:
252
align 4
222
        ret
-
 
223
 
-
 
224
drawwindow_IV_caption:
253
drawwindow_IV_caption:
Line 225... Line 254...
225
 
254
 
226
        mov     ebp, skin_active
255
        mov     ebp, skin_active
227
        or      al, al
256
        or      al, al
228
        jnz     @f
257
        jnz     @f
-
 
258
        mov     ebp, skin_inactive
-
 
259
;--------------------------------------
229
        mov     ebp, skin_inactive
260
align 4
230
    @@:
-
 
231
 
261
@@:
232
        mov     esi, [esp+4]
262
        mov     esi, [esp+4]
233
        mov     eax, [esi+WDATA.box.width]   ; window width
263
        mov     eax, [esi+WDATA.box.width]   ; window width
234
        mov     edx, [ebp+SKIN_DATA.left.left]
264
        mov     edx, [ebp+SKIN_DATA.left.left]
235
        shl     edx, 16
265
        shl     edx, 16
236
        mov     ecx, [ebp+SKIN_DATA.left.width]
266
        mov     ecx, [ebp+SKIN_DATA.left.width]
237
        shl     ecx, 16
267
        shl     ecx, 16
Line 238... Line 268...
238
        add     ecx, [_skinh]
268
        add     ecx, [_skinh]
-
 
269
 
-
 
270
        mov     ebx, [ebp+SKIN_DATA.left.data]
239
 
271
        or      ebx, ebx
-
 
272
        jz      @f
-
 
273
        call    sys_putimage.forced
240
        mov     ebx, [ebp+SKIN_DATA.left.data]
274
;--------------------------------------
241
        call    sys_putimage_with_check
275
align 4
242
 
276
@@:
243
        mov     esi, [esp+4]
277
        mov     esi, [esp+4]
244
        mov     eax, [esi+WDATA.box.width]
278
        mov     eax, [esi+WDATA.box.width]
245
        sub     eax, [ebp+SKIN_DATA.left.width]
279
        sub     eax, [ebp+SKIN_DATA.left.width]
Line 258... Line 292...
258
        shl     ecx, 16
292
        shl     ecx, 16
259
        add     ecx, [_skinh]
293
        add     ecx, [_skinh]
260
        mov     edx, [ebp+SKIN_DATA.base.left]
294
        mov     edx, [ebp+SKIN_DATA.base.left]
261
        sub     edx, [ebp+SKIN_DATA.base.width]
295
        sub     edx, [ebp+SKIN_DATA.base.width]
262
        shl     edx, 16
296
        shl     edx, 16
-
 
297
;--------------------------------------
-
 
298
align 4
263
  .baseskinloop:
299
.baseskinloop:
264
        shr     edx, 16
300
        shr     edx, 16
265
        add     edx, [ebp+SKIN_DATA.base.width]
301
        add     edx, [ebp+SKIN_DATA.base.width]
266
        shl     edx, 16
302
        shl     edx, 16
Line 267... Line 303...
267
 
303
 
-
 
304
        push    eax ebx ecx edx
-
 
305
 
-
 
306
        or      ebx, ebx
268
        push    eax ebx ecx edx
307
        jz      @f
-
 
308
        call    sys_putimage.forced
-
 
309
;--------------------------------------
-
 
310
align 4
269
        call    sys_putimage_with_check
311
@@:
Line 270... Line 312...
270
        pop     edx ecx ebx eax
312
        pop     edx ecx ebx eax
271
 
313
 
-
 
314
        dec     eax
-
 
315
        jnz     .baseskinloop
272
        dec     eax
316
;--------------------------------------
Line 273... Line 317...
273
        jnz     .baseskinloop
317
align 4
274
  .non_base:
318
.non_base:
275
 
319
 
Line 281... Line 325...
281
        mov     ebx, [ebp+SKIN_DATA.oper.data]
325
        mov     ebx, [ebp+SKIN_DATA.oper.data]
Line 282... Line 326...
282
 
326
 
283
        mov     ecx, [ebp+SKIN_DATA.oper.width]
327
        mov     ecx, [ebp+SKIN_DATA.oper.width]
284
        shl     ecx, 16
328
        shl     ecx, 16
285
        add     ecx, [_skinh]
-
 
Line -... Line 329...
-
 
329
        add     ecx, [_skinh]
-
 
330
 
-
 
331
        or      ebx, ebx
-
 
332
        jz      @f
-
 
333
        call    sys_putimage.forced
-
 
334
;--------------------------------------
286
        call    sys_putimage_with_check
335
align 4
287
 
-
 
288
        ret
336
@@:
289
 
-
 
290
;//mike.dld, 2006-08-02 ]
337
        ret
291
 
338
;------------------------------------------------------------------------------
292
 
339
align 4
293
drawwindow_IV:
-
 
294
;param1 - aw_yes
340
drawwindow_IV:
Line 295... Line 341...
295
 
341
;param1 - aw_yes
Line 296... Line 342...
296
        pusha
342
        pusha
Line 297... Line 343...
297
 
343
 
298
        push    edx
344
        push    edx
299
 
345
 
300
        mov     edi, edx
346
        mov     edi, edx
-
 
347
 
-
 
348
        mov     ebp, skin_active
301
 
349
        cmp     byte [esp+32+4+4], 0
302
        mov     ebp, skin_active
-
 
303
        cmp     byte [esp+32+4+4], 0
350
        jne     @f
304
        jne     @f
351
        mov     ebp, skin_inactive
305
        mov     ebp, skin_inactive
352
;--------------------------------------
306
     @@:
353
align 4
307
 
354
@@:
308
        mov     eax, [edi+WDATA.box.left]
355
        mov     eax, [edi+WDATA.box.left]
309
        shl     eax, 16
356
        shl     eax, 16
310
        mov     ax, word [edi+WDATA.box.left]
357
        mov     ax, word [edi+WDATA.box.left]
311
        add     ax, word [edi+WDATA.box.width]
-
 
312
        mov     ebx, [edi+WDATA.box.top]
-
 
313
        shl     ebx, 16
-
 
314
        mov     bx, word [edi+WDATA.box.top]
358
        add     ax, word [edi+WDATA.box.width]
-
 
359
        mov     ebx, [edi+WDATA.box.top]
-
 
360
        shl     ebx, 16
-
 
361
        mov     bx, word [edi+WDATA.box.top]
-
 
362
        add     bx, word [edi+WDATA.box.height]
-
 
363
        mov     esi, [ebp+SKIN_DATA.colors.outer]
315
        add     bx, word [edi+WDATA.box.height]
364
        or      esi, 1 shl 25 ; 0x02000000 used for draw_rectangle without top line
316
;        mov   esi,[edi+24]
365
        ror     ebx, 16
-
 
366
        add     ebx, [_skinh]
-
 
367
        sub     bx, 1
317
;        shr   esi,1
368
        rol     ebx, 16
318
;        and   esi,0x007f7f7f
369
        call    draw_rectangle
319
        mov     esi, [ebp+SKIN_DATA.colors.outer]
370
        mov     ecx, 3
320
        call    draw_rectangle
371
;--------------------------------------
321
        mov     ecx, 3
372
align 4
322
      _dw3l:
373
_dw3l:
323
        add     eax, 1*65536-1
374
        add     eax, 1*65536-1
324
        add     ebx, 1*65536-1
375
        add     ebx, 0*65536-1
-
 
376
        test    ax, ax
325
        test    ax, ax
377
        js      no_skin_add_button
326
        js      no_skin_add_button
378
        test    bx, bx
327
        test    bx, bx
379
        js      no_skin_add_button
328
        js      no_skin_add_button
380
        mov     esi, [ebp+SKIN_DATA.colors.frame];[edi+24]
-
 
381
        or      esi, 1 shl 25; 0x02000000 used for draw_rectangle without top line
329
        mov     esi, [ebp+SKIN_DATA.colors.frame];[edi+24]
382
        call    draw_rectangle
330
        call    draw_rectangle
383
        dec     ecx
331
        dec     ecx
384
        jnz     _dw3l
332
        jnz     _dw3l
385
        mov     esi, [ebp+SKIN_DATA.colors.inner]
333
        mov     esi, [ebp+SKIN_DATA.colors.inner]
386
        or      esi, 1 shl 25; 0x02000000 used for draw_rectangle without top line
334
        add     eax, 1*65536-1
387
        add     eax, 1*65536-1
-
 
388
        add     ebx, 0*65536-1
-
 
389
        test    ax, ax
335
        add     ebx, 1*65536-1
390
        js      no_skin_add_button
-
 
391
        test    bx, bx
-
 
392
        js      no_skin_add_button
336
        test    ax, ax
393
        test    [edi + WDATA.fl_wstate], WSTATE_ROLLEDUP
337
        js      no_skin_add_button
394
        jnz     @f
338
        test    bx, bx
395
        call    draw_rectangle
339
        js      no_skin_add_button
396
;--------------------------------------
340
        call    draw_rectangle
397
align 4
341
 
398
@@:
342
        cmp     dword[skin_data], 'SKIN'
399
        cmp     dword[skin_data], 'SKIN'
343
        je      @f
400
        je      @f
344
        xor     eax, eax
401
        xor     eax, eax
345
        xor     ebx, ebx
402
        xor     ebx, ebx
346
        mov     esi, [esp]
403
        mov     esi, [esp]
-
 
404
        mov     ecx, [esi+WDATA.box.width]
347
        mov     ecx, [esi+WDATA.box.width]
405
        inc     ecx
-
 
406
        mov     edx, [_skinh]
-
 
407
        mov     edi, [common_colours+4]; standard grab color
348
        inc     ecx
408
;        call    [drawbar]
349
        mov     edx, [_skinh]
-
 
350
        mov     edi, [common_colours+4]; standard grab color
409
        call    vesa20_drawbar
351
        call    [drawbar]
410
        jmp     draw_clientbar
-
 
411
;--------------------------------------
352
        jmp     draw_clientbar
412
align 4
353
    @@:
413
@@:
354
 
-
 
355
        mov     al, [esp+32+4+4]
414
        mov     al, [esp+32+4+4]
Line 356... Line 415...
356
        call    drawwindow_IV_caption
415
        call    drawwindow_IV_caption
357
 
416
;--------------------------------------
358
    draw_clientbar:
417
align 4
Line 372... Line 431...
372
        sub     ecx, 4
431
        sub     ecx, 4
373
        sub     edx, 4
432
        sub     edx, 4
374
        mov     edi, [esi+WDATA.cl_workarea]
433
        mov     edi, [esi+WDATA.cl_workarea]
375
        test    edi, 0x40000000
434
        test    edi, 0x40000000
376
        jnz     _noinside2
435
        jnz     _noinside2
377
        call    [drawbar]
436
;        call    [drawbar]
-
 
437
        call    vesa20_drawbar
-
 
438
;--------------------------------------
-
 
439
align 4
378
      _noinside2:
440
_noinside2:
379
 
-
 
380
        cmp     dword[skin_data], 'SKIN'
441
        cmp     dword[skin_data], 'SKIN'
381
        jne     no_skin_add_button
442
        jne     no_skin_add_button
382
 
-
 
383
;* close button
443
;* close button
384
        mov     edi, [BTN_ADDR]
444
        mov     edi, [BTN_ADDR]
385
        movzx   eax, word [edi]
445
        movzx   eax, word [edi]
386
        cmp     eax, 1000
446
        cmp     eax, 1000
387
        jge     no_skin_add_button
447
        jge     no_skin_add_button
Line 402... Line 462...
402
        cmp     [skin_btn_close.left], 0
462
        cmp     [skin_btn_close.left], 0
403
        jge     _bCx_at_right
463
        jge     _bCx_at_right
404
        mov     ebx, [esp]
464
        mov     ebx, [esp]
405
        mov     ebx, [ebx+WDATA.box.width]
465
        mov     ebx, [ebx+WDATA.box.width]
406
        inc     ebx
466
        inc     ebx
-
 
467
;--------------------------------------
-
 
468
align 4
407
      _bCx_at_right:
469
_bCx_at_right:
408
        add     ebx, [skin_btn_close.left]
470
        add     ebx, [skin_btn_close.left]
409
        mov     [eax], bx
471
        mov     [eax], bx
410
        add     eax, 2      ; x size
472
        add     eax, 2      ; x size
411
        mov     ebx, [skin_btn_close.width]
473
        mov     ebx, [skin_btn_close.width]
Line 416... Line 478...
416
        mov     [eax], bx
478
        mov     [eax], bx
417
        add     eax, 2      ; y size
479
        add     eax, 2      ; y size
418
        mov     ebx, [skin_btn_close.height]
480
        mov     ebx, [skin_btn_close.height]
419
        dec     ebx
481
        dec     ebx
420
        mov     [eax], bx
482
        mov     [eax], bx
421
 
-
 
422
;* minimize button
483
;* minimize button
423
        mov     edi, [BTN_ADDR]
484
        mov     edi, [BTN_ADDR]
424
        movzx   eax, word [edi]
485
        movzx   eax, word [edi]
425
        cmp     eax, 1000
486
        cmp     eax, 1000
426
        jge     no_skin_add_button
487
        jge     no_skin_add_button
Line 441... Line 502...
441
        cmp     [skin_btn_minimize.left], 0
502
        cmp     [skin_btn_minimize.left], 0
442
        jge     _bMx_at_right
503
        jge     _bMx_at_right
443
        mov     ebx, [esp]
504
        mov     ebx, [esp]
444
        mov     ebx, [ebx+WDATA.box.width]
505
        mov     ebx, [ebx+WDATA.box.width]
445
        inc     ebx
506
        inc     ebx
-
 
507
;--------------------------------------
-
 
508
align 4
446
      _bMx_at_right:
509
_bMx_at_right:
447
        add     ebx, [skin_btn_minimize.left]
510
        add     ebx, [skin_btn_minimize.left]
448
        mov     [eax], bx
511
        mov     [eax], bx
449
        add     eax, 2      ; x size
512
        add     eax, 2      ; x size
450
        mov     ebx, [skin_btn_minimize.width]
513
        mov     ebx, [skin_btn_minimize.width]
Line 455... Line 518...
455
        mov     [eax], bx
518
        mov     [eax], bx
456
        add     eax, 2      ; y size
519
        add     eax, 2      ; y size
457
        mov     ebx, [skin_btn_minimize.height]
520
        mov     ebx, [skin_btn_minimize.height]
458
        dec     ebx
521
        dec     ebx
459
        mov     [eax], bx
522
        mov     [eax], bx
-
 
523
;--------------------------------------
460
 
524
align 4
461
      no_skin_add_button:
525
no_skin_add_button:
462
        pop     edi
526
        pop     edi
463
        popa
527
        popa
464
 
-
 
465
        ret     4
528
        ret     4
466
-
 
-
 
529
;------------------------------------------------------------------------------