Subversion Repositories Kolibri OS

Rev

Rev 2 | Rev 33 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 7
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                          ;;
2
;;                                          ;;
3
;;   WINDOW SKIN for MenuetOS               ;;
3
;;   WINDOW SKIN for MenuetOS               ;;
4
;;                                          ;;
4
;;                                          ;;
5
;;   entryway@bkg.lt                        ;;
5
;;   entryway@bkg.lt                        ;;
6
;;                                          ;;
6
;;                                          ;;
7
;;   Bugfixes & upgrades by                 ;;
7
;;   Bugfixes & upgrades by                 ;;
8
;;             Samuel Rodriguez Perez       ;;
8
;;             Samuel Rodriguez Perez       ;;
9
;;             Xeoda@ciberirmandade.org     ;;
9
;;             Xeoda@ciberirmandade.org     ;;
10
;;                                          ;;
10
;;                                          ;;
11
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
11
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12
 
12
 
13
 
13
 
14
 
14
 
15
include "SKINDATA.INC"
15
include "skindata.inc"
16
 
16
 
17
virtual at 0
17
virtual at 0
18
  bmp_header:
18
  bmp_header:
19
    .type       rw  1  ; "BM" signature
19
    .type       rw  1  ; "BM" signature
20
    .filesize   rd  1  ; size of the file
20
    .filesize   rd  1  ; size of the file
21
    .reserved   rd  1  ; zero
21
    .reserved   rd  1  ; zero
22
    .offbits    rd  1  ; pointer to image data
22
    .offbits    rd  1  ; pointer to image data
23
    ;----------------
23
    ;----------------
24
    .headsize   rd  1  ; usually 40 bytes for image header
24
    .headsize   rd  1  ; usually 40 bytes for image header
25
    .width      rd  1
25
    .width      rd  1
26
    .height     rd  1
26
    .height     rd  1
27
    .planes     rw  1  ; usually 1
27
    .planes     rw  1  ; usually 1
28
    .bitcount   rw  1  ; currently 24 bits/pixel (0x18)
28
    .bitcount   rw  1  ; currently 24 bits/pixel (0x18)
29
    .compress   rd  1  ; zero
29
    .compress   rd  1  ; zero
30
    .sizeimage  rd  1  ; x*y*(bitcount/8)
30
    .sizeimage  rd  1  ; x*y*(bitcount/8)
31
    .unused     rd  4  ; these bits aren't used by MeOS
31
    .unused     rd  4  ; these bits aren't used by MeOS
32
  bmp_data:
32
  bmp_data:
33
end virtual
33
end virtual
34
 
34
 
35
virtual at 0x778000
35
virtual at 0x778000
36
  _bmp_bpl dd ?        ; bytes per line
36
  _bmp_bpl dd ?        ; bytes per line
37
  _bmp_dpl dd ?        ; dwords per line
37
  _bmp_dpl dd ?        ; dwords per line
38
  _bmp_zb  dd ?        ; bytes filled by zeroes at the end of a scanline
38
  _bmp_zb  dd ?        ; bytes filled by zeroes at the end of a scanline
39
 align 32
39
 align 32
40
  raw_data:
40
  raw_data:
41
end virtual
41
end virtual
42
 
42
 
43
bmp2raw:
43
bmp2raw:
44
; esi = to bmp data (source)
44
; esi = to bmp data (source)
45
; edi = to raw data (destination)
45
; edi = to raw data (destination)
46
    cmp   [esi+bmp_header.type],'BM'     ; check if bmp file is really loaded
46
    cmp   [esi+bmp_header.type],'BM'     ; check if bmp file is really loaded
47
    jne   .finish
47
    jne   .finish
48
    mov   edx,esi
48
    mov   edx,esi
49
 
49
 
50
    mov   eax,[edx+bmp_header.width]
50
    mov   eax,[edx+bmp_header.width]
51
    imul  eax,3
51
    imul  eax,3
52
    push  eax
52
    push  eax
53
    test  eax,11b
53
    test  eax,11b
54
    jz    @f
54
    jz    @f
55
    add   eax,4
55
    add   eax,4
56
  @@:
56
  @@:
57
    shr   eax,2
57
    shr   eax,2
58
    mov   [_bmp_dpl],eax
58
    mov   [_bmp_dpl],eax
59
    shl   eax,2
59
    shl   eax,2
60
    mov   [_bmp_bpl],eax
60
    mov   [_bmp_bpl],eax
61
    pop   ebx
61
    pop   ebx
62
    sub   eax,ebx
62
    sub   eax,ebx
63
    mov   [_bmp_zb],eax
63
    mov   [_bmp_zb],eax
64
 
64
 
65
    add   esi,bmp_data
65
    add   esi,bmp_data
66
    mov   eax,[_bmp_bpl]
66
    mov   eax,[_bmp_bpl]
67
    imul  eax,[edx+bmp_header.height]
67
    imul  eax,[edx+bmp_header.height]
68
    add   esi,eax
68
    add   esi,eax
69
    mov   ebx,[edx+bmp_header.height]    ; ebx = y
69
    mov   ebx,[edx+bmp_header.height]    ; ebx = y
70
    cld
70
    cld
71
    .y_begin:
71
    .y_begin:
72
       sub   esi,[_bmp_bpl]
72
       sub   esi,[_bmp_bpl]
73
       push  esi
73
       push  esi
74
       mov   ecx,[_bmp_dpl]
74
       mov   ecx,[_bmp_dpl]
75
       rep   movsd
75
       rep   movsd
76
       pop   esi
76
       pop   esi
77
       sub   edi,[_bmp_zb]
77
       sub   edi,[_bmp_zb]
78
    dec   ebx
78
    dec   ebx
79
    jne   .y_begin
79
    jne   .y_begin
80
 
80
 
81
.finish:
81
.finish:
82
    ret
82
    ret
83
 
83
 
84
 
84
 
85
; BMP support by Ivan Poddubny
85
; BMP support by Ivan Poddubny
86
; 1) load LEFT.BMP
86
; 1) load LEFT.BMP
87
;   a) _skinleftw = bmp_width
87
;   a) _skinleftw = bmp_width
88
;   b) _skinleft = 0
88
;   b) _skinleft = 0
89
;   c) _refleft = 0x778000
89
;   c) _refleft = 0x778000
90
;   d) convert
90
;   d) convert
91
; 2) load BASE.BMP
91
; 2) load BASE.BMP
92
;   a) _skinbasew = bmp_width
92
;   a) _skinbasew = bmp_width
93
;   b) _skinbase = _skinleftw
93
;   b) _skinbase = _skinleftw
94
;   c) _refbase = _refleft+sizeof(left_raw_converted)
94
;   c) _refbase = _refleft+sizeof(left_raw_converted)
95
;   d) convert
95
;   d) convert
96
; 3) load OPER.BMP
96
; 3) load OPER.BMP
97
;   a) _skinoper = minus width from bmp file
97
;   a) _skinoper = minus width from bmp file
98
;   b) _skinoperw = width from bmp file
98
;   b) _skinoperw = width from bmp file
99
;   c) _refoper = _refbase+sizeof(oper_raw_converted)
99
;   c) _refoper = _refbase+sizeof(oper_raw_converted)
100
;   d) convert
100
;   d) convert
101
; 4) set height
101
; 4) set height
102
 
102
 
103
load_bmp_file:
103
load_bmp_file:
104
; eax = pointer to filename
104
; eax = pointer to filename
105
    mov   ebx, 1
105
    mov   ebx, 1
106
    or    ecx, -1
106
    or    ecx, -1
107
    mov   edx, 0x90000
107
    mov   edx, 0x90000
108
    mov   esi, 12
108
    mov   esi, 12
109
    call  fileread
109
    call  fileread
110
    ret
110
    ret
111
 
111
 
112
 
112
 
113
load_default_skin:
113
load_default_skin:
114
    pushad
114
    pushad
115
    mov   eax, _fileleft
115
    mov   eax, _fileleft
116
    call  load_bmp_file
116
    call  load_bmp_file
117
    mov   eax, [0x90000+bmp_header.width]
117
    mov   eax, [0x90000+bmp_header.width]
118
    mov   [_skinleftw], eax
118
    mov   [_skinleftw], eax
119
    mov   [_skinleft], 0
119
    mov   [_skinleft], 0
120
    mov   edi, raw_data
120
    mov   edi, raw_data
121
    mov   [_refleft], edi
121
    mov   [_refleft], edi
122
    mov   esi, 0x90000
122
    mov   esi, 0x90000
123
    call  bmp2raw
123
    call  bmp2raw
124
    mov   eax, [_bmp_bpl]
124
    mov   eax, [_bmp_bpl]
125
    imul  eax, [0x90000+bmp_header.height]
125
    imul  eax, [0x90000+bmp_header.height]
126
    push  eax
126
    push  eax
127
 
127
 
128
    mov   eax, _filebase
128
    mov   eax, _filebase
129
    call  load_bmp_file
129
    call  load_bmp_file
130
    mov   eax, [0x90000+bmp_header.width]
130
    mov   eax, [0x90000+bmp_header.width]
131
    mov   [_skinbasew], eax
131
    mov   [_skinbasew], eax
132
    mov   eax, [_skinleftw]
132
    mov   eax, [_skinleftw]
133
    mov   [_skinbase], eax
133
    mov   [_skinbase], eax
134
    pop   eax
134
    pop   eax
135
    add   eax, [_refleft]
135
    add   eax, [_refleft]
136
    ; align to 32-byte boundary
136
    ; align to 32-byte boundary
137
    test  eax, 11111b
137
    test  eax, 11111b
138
    jz    @f
138
    jz    @f
139
    shr   eax, 5
139
    shr   eax, 5
140
    inc   eax
140
    inc   eax
141
    shl   eax, 5
141
    shl   eax, 5
142
  @@:
142
  @@:
143
    ; save base address
143
    ; save base address
144
    mov   [_refbase], eax
144
    mov   [_refbase], eax
145
    ; convert
145
    ; convert
146
    mov   edi, eax
146
    mov   edi, eax
147
    mov   esi, 0x90000
147
    mov   esi, 0x90000
148
    call  bmp2raw
148
    call  bmp2raw
149
    mov   eax, [_bmp_bpl]
149
    mov   eax, [_bmp_bpl]
150
    imul  eax, [0x90000+bmp_header.height]
150
    imul  eax, [0x90000+bmp_header.height]
151
    push  eax
151
    push  eax
152
 
152
 
153
    mov   eax, _fileoper
153
    mov   eax, _fileoper
154
    call  load_bmp_file
154
    call  load_bmp_file
155
    mov   eax, [0x90000+bmp_header.width]
155
    mov   eax, [0x90000+bmp_header.width]
156
    mov   [_skinoperw], eax
156
    mov   [_skinoperw], eax
157
    neg   eax
157
    neg   eax
158
    mov   [_skinoper], eax
158
    mov   [_skinoper], eax
159
    pop   eax
159
    pop   eax
160
    add   eax, [_refbase]
160
    add   eax, [_refbase]
161
    ; align to 32-byte boundary
161
    ; align to 32-byte boundary
162
    test  eax, 11111b
162
    test  eax, 11111b
163
    jz    @f
163
    jz    @f
164
    shr   eax, 5
164
    shr   eax, 5
165
    inc   eax
165
    inc   eax
166
    shl   eax, 5
166
    shl   eax, 5
167
  @@:
167
  @@:
168
    mov   [_refoper], eax
168
    mov   [_refoper], eax
169
    mov   edi, eax
169
    mov   edi, eax
170
    mov   esi, 0x90000
170
    mov   esi, 0x90000
171
    call  bmp2raw
171
    call  bmp2raw
172
 
172
 
173
 
173
 
174
;    mov   eax, [0x90000+bmp_header.height]
174
;    mov   eax, [0x90000+bmp_header.height]
175
;    imul  eax, [0x90000+bmp_header.width]
175
;    imul  eax, [0x90000+bmp_header.width]
176
;    imul  eax, 3
176
;    imul  eax, 3
177
;    add   eax, raw_data  ; now eax points to the last line of image
177
;    add   eax, raw_data  ; now eax points to the last line of image
178
 
178
 
179
;    mov   ecx, [eax]
179
;    mov   ecx, [eax]
180
;    mov   [_coloroutborder], ecx
180
;    mov   [_coloroutborder], ecx
181
;    mov   [_colorborder], ecx
181
;    mov   [_colorborder], ecx
182
;    sub   eax, 2*3
182
;    sub   eax, 2*3
183
;    mov   ecx, [eax]
183
;    mov   ecx, [eax]
184
;    mov   [_colorframe], ecx
184
;    mov   [_colorframe], ecx
185
 
185
 
186
 
186
 
187
    mov   eax, [0x90000+bmp_header.height]
187
    mov   eax, [0x90000+bmp_header.height]
188
    mov   [_skinh], eax
188
    mov   [_skinh], eax
189
    popad
189
    popad
190
    ret
190
    ret
191
 
191
 
192
 
192
 
193
 
193
 
194
drawwindow_IV:
194
drawwindow_IV:
195
 
195
 
196
        pusha
196
        pusha
197
 
197
 
198
        push  edx
198
        push  edx
199
 
199
 
200
        mov   edi,[esp]                              ; RECTANGLE
200
        mov   edi,[esp]                              ; RECTANGLE
201
 
201
 
202
        mov   eax,[edi+0]
202
        mov   eax,[edi+0]
203
        shl   eax,16
203
        shl   eax,16
204
        mov   ax,[edi+0]
204
        mov   ax,[edi+0]
205
        add   ax,[edi+8]
205
        add   ax,[edi+8]
206
        mov   ebx,[edi+4]
206
        mov   ebx,[edi+4]
207
        shl   ebx,16
207
        shl   ebx,16
208
        mov   bx,[edi+4]
208
        mov   bx,[edi+4]
209
        add   bx,[edi+12]
209
        add   bx,[edi+12]
210
;        mov   esi,[edi+24]
210
;        mov   esi,[edi+24]
211
;        shr   esi,1
211
;        shr   esi,1
212
;        and   esi,0x007f7f7f
212
;        and   esi,0x007f7f7f
213
        mov   esi,[_coloroutborder]
213
        mov   esi,[_coloroutborder]
214
        call  draw_rectangle
214
        call  draw_rectangle
215
        mov   ecx,3
215
        mov   ecx,3
216
      _dw3l:
216
      _dw3l:
217
        add   eax,1*65536-1
217
        add   eax,1*65536-1
218
        add   ebx,1*65536-1
218
        add   ebx,1*65536-1
219
        test  ax,ax
219
        test  ax,ax
220
        js    no_skin_add_button
220
        js    no_skin_add_button
221
        test  bx,bx
221
        test  bx,bx
222
        js    no_skin_add_button
222
        js    no_skin_add_button
223
        mov   esi,[_colorframe] ;[edi+24]
223
        mov   esi,[_colorframe] ;[edi+24]
224
        call  draw_rectangle
224
        call  draw_rectangle
225
        dec   ecx
225
        dec   ecx
226
        jnz   _dw3l
226
        jnz   _dw3l
227
        mov   esi,[_colorborder]
227
        mov   esi,[_colorborder]
228
        add   eax,1*65536-1
228
        add   eax,1*65536-1
229
        add   ebx,1*65536-1
229
        add   ebx,1*65536-1
230
        test  ax,ax
230
        test  ax,ax
231
        js    no_skin_add_button
231
        js    no_skin_add_button
232
        test  bx,bx
232
        test  bx,bx
233
        js    no_skin_add_button
233
        js    no_skin_add_button
234
        call  draw_rectangle
234
        call  draw_rectangle
235
 
235
 
236
        mov   esi,[esp]
236
        mov   esi,[esp]
237
        mov   eax,[esi+8]    ; window width
237
        mov   eax,[esi+8]    ; window width
238
        mov   edx,[_skinleft]
238
        mov   edx,[_skinleft]
239
        shl   edx,16
239
        shl   edx,16
240
        mov   ecx,[_skinleftw]
240
        mov   ecx,[_skinleftw]
241
        shl   ecx,16
241
        shl   ecx,16
242
        add   ecx,[_skinh]
242
        add   ecx,[_skinh]
243
        mov   ebx,[_refleft]
243
        mov   ebx,[_refleft]
244
        call  sys_putimage
244
        call  sys_putimage
245
 
245
 
246
        mov   esi,[esp]
246
        mov   esi,[esp]
247
        mov   eax,[esi+8]
247
        mov   eax,[esi+8]
248
        sub   eax,[_skinleftw]
248
        sub   eax,[_skinleftw]
249
        sub   eax,[_skinoperw]
249
        sub   eax,[_skinoperw]
250
        cmp   eax,[_skinbase]
250
        cmp   eax,[_skinbase]
251
        jng   non_base
251
        jng   non_base
252
        xor   edx,edx
252
        xor   edx,edx
253
        mov   ebx,[_skinbasew]
253
        mov   ebx,[_skinbasew]
254
        div   ebx
254
        div   ebx
255
 
255
 
256
        inc   eax
256
        inc   eax
257
 
257
 
258
        mov   ebx,[_refbase]
258
        mov   ebx,[_refbase]
259
        mov   ecx,[_skinbasew]
259
        mov   ecx,[_skinbasew]
260
        shl   ecx,16
260
        shl   ecx,16
261
        add   ecx,[_skinh]
261
        add   ecx,[_skinh]
262
        mov   edx,[_skinbase]
262
        mov   edx,[_skinbase]
263
        sub   edx,[_skinbasew]
263
        sub   edx,[_skinbasew]
264
        shl   edx,16
264
        shl   edx,16
265
      baseskinloop:
265
      baseskinloop:
266
        shr   edx,16
266
        shr   edx,16
267
        add   edx,[_skinbasew]
267
        add   edx,[_skinbasew]
268
        shl   edx,16
268
        shl   edx,16
269
 
269
 
270
        push  eax ebx ecx edx
270
        push  eax ebx ecx edx
271
        call  sys_putimage
271
        call  sys_putimage
272
        pop   edx ecx ebx eax
272
        pop   edx ecx ebx eax
273
 
273
 
274
        dec   eax
274
        dec   eax
275
        jnz   baseskinloop
275
        jnz   baseskinloop
276
      non_base:
276
      non_base:
277
 
277
 
278
        mov   esi,[esp]
278
        mov   esi,[esp]
279
        mov   edx,[esi+8]
279
        mov   edx,[esi+8]
280
        sub   edx,[_skinoperw]
280
        sub   edx,[_skinoperw]
281
        inc   edx
281
        inc   edx
282
        shl   edx,16
282
        shl   edx,16
283
        mov   ebx,[_refoper]
283
        mov   ebx,[_refoper]
284
        mov   ecx,[_skinoperw]
284
        mov   ecx,[_skinoperw]
285
        shl   ecx,16
285
        shl   ecx,16
286
        add   ecx,[_skinh]
286
        add   ecx,[_skinh]
287
        call  sys_putimage
287
        call  sys_putimage
288
 
288
 
289
        mov   esi,[esp]
289
        mov   esi,[esp]
290
 
290
 
291
        mov   edx,[esi+04]                       ; WORK AREA
291
        mov   edx,[esi+04]                       ; WORK AREA
292
        add   edx,21+5
292
        add   edx,21+5
293
        mov   ebx,[esi+04]
293
        mov   ebx,[esi+04]
294
        add   ebx,[esi+12]
294
        add   ebx,[esi+12]
295
        cmp   edx,ebx
295
        cmp   edx,ebx
296
        jg    _noinside2
296
        jg    _noinside2
297
        mov   eax,5
297
        mov   eax,5
298
        mov   ebx,[_skinh]
298
        mov   ebx,[_skinh]
299
        mov   ecx,[esi+8]
299
        mov   ecx,[esi+8]
300
        mov   edx,[esi+12]
300
        mov   edx,[esi+12]
301
        sub   ecx,4
301
        sub   ecx,4
302
        sub   edx,4
302
        sub   edx,4
303
        mov   edi,[esi+16]
303
        mov   edi,[esi+16]
304
        call  [drawbar]
304
        call  [drawbar]
305
      _noinside2:
305
      _noinside2:
306
 
306
 
307
        mov   edi,[0xfe88]
307
        mov   edi,[0xfe88]
308
        movzx eax,word [edi]
308
        movzx eax,word [edi]
309
        cmp   eax,1000
309
        cmp   eax,1000
310
        jge   no_skin_add_button
310
        jge   no_skin_add_button
311
        inc   eax
311
        inc   eax
312
        mov   [edi],ax
312
        mov   [edi],ax
313
 
313
 
314
        shl   eax,4
314
        shl   eax,4
315
        add   eax,edi
315
        add   eax,edi
316
 
316
 
317
        mov   bx,[0x3000]
317
        mov   bx,[0x3000]
318
        mov   [eax],bx
318
        mov   [eax],bx
319
 
319
 
320
        add   eax,2         ; save button id number
320
        add   eax,2         ; save button id number
321
        mov   bx,1
321
        mov   bx,1
322
        mov   [eax],bx
322
        mov   [eax],bx
323
        add   eax,2         ; x start
323
        add   eax,2         ; x start
324
        mov   ebx,[esp]
324
        mov   ebx,[esp]
325
        mov   ebx,[ebx+8]
325
        mov   ebx,[ebx+8]
326
        cmp   [_buttonCx],0
326
        cmp   [_buttonCx],0
327
        jg    _bCx_at_right
327
        jg    _bCx_at_right
328
        mov   ebx,[_buttonCw]    ; ebx will be 0 in next instruction
328
        mov   ebx,[_buttonCw]    ; ebx will be 0 in next instruction
329
      _bCx_at_right:
329
      _bCx_at_right:
330
        sub   ebx,[_buttonCw]
330
        sub   ebx,[_buttonCw]
331
        sub   ebx,[_buttonCx]
331
        sub   ebx,[_buttonCx]
332
        mov   [eax],bx
332
        mov   [eax],bx
333
        add   eax,2         ; x size
333
        add   eax,2         ; x size
334
        mov   ebx,[_buttonCw]
334
        mov   ebx,[_buttonCw]
335
        mov   [eax],bx
335
        mov   [eax],bx
336
        add   eax,2         ; y start
336
        add   eax,2         ; y start
337
        mov   ebx,[_buttonCy]
337
        mov   ebx,[_buttonCy]
338
        mov   [eax],bx
338
        mov   [eax],bx
339
        add   eax,2         ; y size
339
        add   eax,2         ; y size
340
        mov   ebx,[_buttonCh]
340
        mov   ebx,[_buttonCh]
341
        mov   [eax],bx
341
        mov   [eax],bx
342
 
342
 
343
;* minimize button
343
;* minimize button
344
        mov   edi,[0xfe88]
344
        mov   edi,[0xfe88]
345
        movzx eax,word [edi]
345
        movzx eax,word [edi]
346
        cmp   eax,1000
346
        cmp   eax,1000
347
        jge   no_skin_add_button
347
        jge   no_skin_add_button
348
        inc   eax
348
        inc   eax
349
        mov   [edi],ax
349
        mov   [edi],ax
350
 
350
 
351
        shl   eax,4
351
        shl   eax,4
352
        add   eax,edi
352
        add   eax,edi
353
 
353
 
354
        mov   bx,[0x3000]
354
        mov   bx,[0x3000]
355
        mov   [eax],bx
355
        mov   [eax],bx
356
 
356
 
357
        add   eax,2         ; save button id number
357
        add   eax,2         ; save button id number
358
        mov   bx,65535 ;999
358
        mov   bx,65535 ;999
359
        mov   [eax],bx
359
        mov   [eax],bx
360
        add   eax,2         ; x start
360
        add   eax,2         ; x start
361
        mov   ebx,[esp]
361
        mov   ebx,[esp]
362
        mov   ebx,[ebx+8]
362
        mov   ebx,[ebx+8]
363
        cmp   [_buttonMx],0
363
        cmp   [_buttonMx],0
364
        jg    _bMx_at_right
364
        jg    _bMx_at_right
365
        mov   ebx,[_buttonMw]    ; ebx will be 0 in next instruction
365
        mov   ebx,[_buttonMw]    ; ebx will be 0 in next instruction
366
      _bMx_at_right:
366
      _bMx_at_right:
367
        sub   ebx,[_buttonMw]
367
        sub   ebx,[_buttonMw]
368
        sub   ebx,[_buttonMx]
368
        sub   ebx,[_buttonMx]
369
        mov   [eax],bx
369
        mov   [eax],bx
370
        add   eax,2         ; x size
370
        add   eax,2         ; x size
371
        mov   ebx,[_buttonMw]
371
        mov   ebx,[_buttonMw]
372
        mov   [eax],bx
372
        mov   [eax],bx
373
        add   eax,2         ; y start
373
        add   eax,2         ; y start
374
        mov   ebx,[_buttonMy]
374
        mov   ebx,[_buttonMy]
375
        mov   [eax],bx
375
        mov   [eax],bx
376
        add   eax,2         ; y size
376
        add   eax,2         ; y size
377
        mov   ebx,[_buttonMh]
377
        mov   ebx,[_buttonMh]
378
        mov   [eax],bx
378
        mov   [eax],bx
379
;* minimize button
379
;* minimize button
380
 
380
 
381
      no_skin_add_button:
381
      no_skin_add_button:
382
 
382
 
383
        add   esp,4
383
        add   esp,4
384
        popa
384
        popa
385
        ret
385
        ret