2011-10-14 23:38:50 +02:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; ;;
|
2015-01-08 21:10:22 +01:00
|
|
|
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
|
2011-10-14 23:38:50 +02:00
|
|
|
;; Distributed under terms of the GNU General Public License ;;
|
|
|
|
;; ;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
$Revision$
|
|
|
|
|
|
|
|
|
|
|
|
include "skindata.inc"
|
|
|
|
|
|
|
|
;skin_data = 0x00778000
|
2014-04-06 12:20:38 +02:00
|
|
|
;-----------------------------------------------------------------
|
2012-03-08 14:45:18 +01:00
|
|
|
align 4
|
2011-10-14 23:38:50 +02:00
|
|
|
read_skin_file:
|
|
|
|
stdcall load_file, ebx
|
|
|
|
test eax, eax
|
|
|
|
jz .notfound
|
2013-06-02 11:36:14 +02:00
|
|
|
|
2011-10-14 23:38:50 +02:00
|
|
|
cmp dword [eax], 'SKIN'
|
|
|
|
jnz .noskin
|
|
|
|
|
2013-06-02 11:36:14 +02:00
|
|
|
xchg eax, [skin_data]
|
2015-08-03 14:35:06 +02:00
|
|
|
test eax, eax
|
|
|
|
jz @f
|
2013-06-02 11:36:14 +02:00
|
|
|
|
|
|
|
stdcall kernel_free, eax
|
|
|
|
@@:
|
2011-10-14 23:38:50 +02:00
|
|
|
call parse_skin_data
|
|
|
|
xor eax, eax
|
|
|
|
ret
|
2012-03-08 14:45:18 +01:00
|
|
|
;--------------------------------------
|
|
|
|
align 4
|
2011-10-14 23:38:50 +02:00
|
|
|
.notfound:
|
|
|
|
xor eax, eax
|
|
|
|
inc eax
|
|
|
|
ret
|
2012-03-08 14:45:18 +01:00
|
|
|
;--------------------------------------
|
|
|
|
align 4
|
2011-10-14 23:38:50 +02:00
|
|
|
.noskin:
|
|
|
|
stdcall kernel_free, eax
|
2013-06-02 11:36:14 +02:00
|
|
|
mov eax, 2
|
2011-10-14 23:38:50 +02:00
|
|
|
ret
|
2012-03-08 14:45:18 +01:00
|
|
|
;------------------------------------------------------------------------------
|
2012-02-22 16:46:09 +01:00
|
|
|
struct SKIN_HEADER
|
|
|
|
ident dd ?
|
|
|
|
version dd ?
|
|
|
|
params dd ?
|
|
|
|
buttons dd ?
|
|
|
|
bitmaps dd ?
|
2011-10-14 23:38:50 +02:00
|
|
|
ends
|
|
|
|
|
2012-02-22 16:46:09 +01:00
|
|
|
struct SKIN_PARAMS
|
|
|
|
skin_height dd ?
|
|
|
|
margin.right dw ?
|
|
|
|
margin.left dw ?
|
|
|
|
margin.bottom dw ?
|
|
|
|
margin.top dw ?
|
|
|
|
colors.inner dd ?
|
|
|
|
colors.outer dd ?
|
|
|
|
colors.frame dd ?
|
|
|
|
colors_1.inner dd ?
|
|
|
|
colors_1.outer dd ?
|
|
|
|
colors_1.frame dd ?
|
|
|
|
dtp.size dd ?
|
|
|
|
dtp.data rb 40
|
2011-10-14 23:38:50 +02:00
|
|
|
ends
|
|
|
|
|
2012-02-22 16:46:09 +01:00
|
|
|
struct SKIN_BUTTONS
|
|
|
|
type dd ?
|
|
|
|
; position
|
|
|
|
left dw ?
|
|
|
|
top dw ?
|
|
|
|
; size
|
|
|
|
width dw ?
|
|
|
|
height dw ?
|
2011-10-14 23:38:50 +02:00
|
|
|
ends
|
|
|
|
|
2012-02-22 16:46:09 +01:00
|
|
|
struct SKIN_BITMAPS
|
|
|
|
kind dw ?
|
|
|
|
type dw ?
|
|
|
|
data dd ?
|
2011-10-14 23:38:50 +02:00
|
|
|
ends
|
2012-03-08 14:45:18 +01:00
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
align 4
|
2011-10-14 23:38:50 +02:00
|
|
|
load_default_skin:
|
|
|
|
mov [_skinh], 22
|
2015-08-03 14:35:06 +02:00
|
|
|
mov ebx, _skin_file_default
|
|
|
|
call read_skin_file
|
|
|
|
ret
|
2012-03-08 14:45:18 +01:00
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
align 4
|
2011-10-14 23:38:50 +02:00
|
|
|
parse_skin_data:
|
2013-06-02 11:36:14 +02:00
|
|
|
mov ebp, [skin_data]
|
2011-10-14 23:38:50 +02:00
|
|
|
cmp [ebp+SKIN_HEADER.ident], 'SKIN'
|
|
|
|
jne .exit
|
|
|
|
|
|
|
|
mov edi, skin_udata
|
2023-06-25 18:42:10 +02:00
|
|
|
mov ecx, (skin_udata.size)/4
|
2011-10-14 23:38:50 +02:00
|
|
|
xor eax, eax
|
|
|
|
cld
|
|
|
|
rep stosd
|
|
|
|
mov ebx, [ebp+SKIN_HEADER.params]
|
2013-06-02 11:36:14 +02:00
|
|
|
add ebx, [skin_data]
|
2011-10-14 23:38:50 +02:00
|
|
|
mov eax, [ebx+SKIN_PARAMS.skin_height]
|
|
|
|
mov [_skinh], eax
|
|
|
|
mov eax, [ebx+SKIN_PARAMS.colors.inner]
|
|
|
|
mov [skin_active.colors.inner], eax
|
|
|
|
mov eax, [ebx+SKIN_PARAMS.colors.outer]
|
|
|
|
mov [skin_active.colors.outer], eax
|
|
|
|
mov eax, [ebx+SKIN_PARAMS.colors.frame]
|
|
|
|
mov [skin_active.colors.frame], eax
|
|
|
|
mov eax, [ebx+SKIN_PARAMS.colors_1.inner]
|
|
|
|
mov [skin_inactive.colors.inner], eax
|
|
|
|
mov eax, [ebx+SKIN_PARAMS.colors_1.outer]
|
|
|
|
mov [skin_inactive.colors.outer], eax
|
|
|
|
mov eax, [ebx+SKIN_PARAMS.colors_1.frame]
|
|
|
|
mov [skin_inactive.colors.frame], eax
|
|
|
|
lea esi, [ebx+SKIN_PARAMS.dtp.data]
|
|
|
|
mov edi, common_colours
|
|
|
|
mov ecx, [ebx+SKIN_PARAMS.dtp.size]
|
2014-04-06 12:06:51 +02:00
|
|
|
and ecx, 255
|
2011-10-14 23:38:50 +02:00
|
|
|
rep movsb
|
|
|
|
mov eax, dword[ebx+SKIN_PARAMS.margin.right]
|
|
|
|
mov dword[_skinmargins+0], eax
|
|
|
|
mov eax, dword[ebx+SKIN_PARAMS.margin.bottom]
|
|
|
|
mov dword[_skinmargins+4], eax
|
|
|
|
mov ebx, [ebp+SKIN_HEADER.bitmaps]
|
2013-06-02 11:36:14 +02:00
|
|
|
add ebx, [skin_data]
|
2012-03-08 14:45:18 +01:00
|
|
|
.lp1:
|
2011-10-14 23:38:50 +02:00
|
|
|
cmp dword[ebx], 0
|
|
|
|
je .end_bitmaps
|
|
|
|
movzx eax, [ebx+SKIN_BITMAPS.kind]
|
|
|
|
movzx ecx, [ebx+SKIN_BITMAPS.type]
|
|
|
|
dec eax
|
|
|
|
jnz .not_left
|
|
|
|
xor eax, eax
|
|
|
|
mov edx, skin_active.left.data
|
|
|
|
or ecx, ecx
|
2016-01-07 17:29:25 +01:00
|
|
|
jnz .next_bitmap
|
2011-10-14 23:38:50 +02:00
|
|
|
mov edx, skin_inactive.left.data
|
|
|
|
jmp .next_bitmap
|
2012-03-08 14:45:18 +01:00
|
|
|
;--------------------------------------
|
|
|
|
align 4
|
|
|
|
.not_left:
|
2011-10-14 23:38:50 +02:00
|
|
|
dec eax
|
|
|
|
jnz .not_oper
|
|
|
|
mov esi, [ebx+SKIN_BITMAPS.data]
|
2013-06-02 11:36:14 +02:00
|
|
|
add esi, [skin_data]
|
2011-10-14 23:38:50 +02:00
|
|
|
mov eax, [esi+0]
|
|
|
|
neg eax
|
|
|
|
mov edx, skin_active.oper.data
|
|
|
|
or ecx, ecx
|
2016-01-07 17:29:25 +01:00
|
|
|
jnz .next_bitmap
|
2011-10-14 23:38:50 +02:00
|
|
|
mov edx, skin_inactive.oper.data
|
|
|
|
jmp .next_bitmap
|
2012-03-08 14:45:18 +01:00
|
|
|
;--------------------------------------
|
|
|
|
align 4
|
|
|
|
.not_oper:
|
2011-10-14 23:38:50 +02:00
|
|
|
dec eax
|
|
|
|
jnz .not_base
|
|
|
|
mov eax, [skin_active.left.width]
|
|
|
|
mov edx, skin_active.base.data
|
|
|
|
or ecx, ecx
|
2016-01-07 17:29:25 +01:00
|
|
|
jnz .next_bitmap
|
2011-10-14 23:38:50 +02:00
|
|
|
mov eax, [skin_inactive.left.width]
|
|
|
|
mov edx, skin_inactive.base.data
|
|
|
|
jmp .next_bitmap
|
2012-03-08 14:45:18 +01:00
|
|
|
;--------------------------------------
|
|
|
|
align 4
|
|
|
|
.not_base:
|
2011-10-14 23:38:50 +02:00
|
|
|
add ebx, 8
|
|
|
|
jmp .lp1
|
2012-03-08 14:45:18 +01:00
|
|
|
;--------------------------------------
|
|
|
|
align 4
|
|
|
|
.next_bitmap:
|
2011-10-14 23:38:50 +02:00
|
|
|
mov ecx, [ebx+SKIN_BITMAPS.data]
|
2013-06-02 11:36:14 +02:00
|
|
|
add ecx, [skin_data]
|
2011-10-14 23:38:50 +02:00
|
|
|
mov [edx+4], eax
|
|
|
|
mov eax, [ecx+0]
|
|
|
|
mov [edx+8], eax
|
|
|
|
add ecx, 8
|
|
|
|
mov [edx+0], ecx
|
|
|
|
add ebx, 8
|
|
|
|
jmp .lp1
|
2012-03-08 14:45:18 +01:00
|
|
|
;--------------------------------------
|
|
|
|
align 4
|
|
|
|
.end_bitmaps:
|
2011-10-14 23:38:50 +02:00
|
|
|
mov ebx, [ebp+SKIN_HEADER.buttons]
|
2013-06-02 11:36:14 +02:00
|
|
|
add ebx, [skin_data]
|
2012-03-08 14:45:18 +01:00
|
|
|
.lp2:
|
2011-10-14 23:38:50 +02:00
|
|
|
cmp dword[ebx], 0
|
|
|
|
je .end_buttons
|
|
|
|
mov eax, [ebx+SKIN_BUTTONS.type]
|
|
|
|
dec eax
|
|
|
|
jnz .not_close
|
|
|
|
mov edx, skin_btn_close
|
|
|
|
jmp .next_button
|
2012-03-08 14:45:18 +01:00
|
|
|
;--------------------------------------
|
|
|
|
align 4
|
|
|
|
.not_close:
|
2011-10-14 23:38:50 +02:00
|
|
|
dec eax
|
|
|
|
jnz .not_minimize
|
|
|
|
mov edx, skin_btn_minimize
|
|
|
|
jmp .next_button
|
2012-03-08 14:45:18 +01:00
|
|
|
;--------------------------------------
|
|
|
|
align 4
|
|
|
|
.not_minimize:
|
2011-10-14 23:38:50 +02:00
|
|
|
add ebx, 12
|
|
|
|
jmp .lp2
|
2012-03-08 14:45:18 +01:00
|
|
|
;--------------------------------------
|
|
|
|
align 4
|
|
|
|
.next_button:
|
2011-10-14 23:38:50 +02:00
|
|
|
movsx eax, [ebx+SKIN_BUTTONS.left]
|
|
|
|
mov [edx+SKIN_BUTTON.left], eax
|
|
|
|
movsx eax, [ebx+SKIN_BUTTONS.top]
|
|
|
|
mov [edx+SKIN_BUTTON.top], eax
|
|
|
|
movsx eax, [ebx+SKIN_BUTTONS.width]
|
|
|
|
mov [edx+SKIN_BUTTON.width], eax
|
|
|
|
movsx eax, [ebx+SKIN_BUTTONS.height]
|
|
|
|
mov [edx+SKIN_BUTTON.height], eax
|
|
|
|
add ebx, 12
|
|
|
|
jmp .lp2
|
2012-03-08 14:45:18 +01:00
|
|
|
;--------------------------------------
|
|
|
|
align 4
|
|
|
|
.end_buttons:
|
|
|
|
.exit:
|
2011-10-14 23:38:50 +02:00
|
|
|
ret
|
2012-03-08 14:45:18 +01:00
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
align 4
|
2011-10-14 23:38:50 +02:00
|
|
|
drawwindow_IV_caption:
|
|
|
|
mov ebp, skin_active
|
|
|
|
or al, al
|
|
|
|
jnz @f
|
|
|
|
mov ebp, skin_inactive
|
2012-03-08 14:45:18 +01:00
|
|
|
@@:
|
2011-10-14 23:38:50 +02:00
|
|
|
mov esi, [esp+4]
|
|
|
|
mov eax, [esi+WDATA.box.width] ; window width
|
|
|
|
mov edx, [ebp+SKIN_DATA.left.left]
|
|
|
|
shl edx, 16
|
|
|
|
mov ecx, [ebp+SKIN_DATA.left.width]
|
|
|
|
shl ecx, 16
|
|
|
|
add ecx, [_skinh]
|
|
|
|
mov ebx, [ebp+SKIN_DATA.left.data]
|
2012-03-08 14:45:18 +01:00
|
|
|
or ebx, ebx
|
|
|
|
jz @f
|
|
|
|
call sys_putimage.forced
|
|
|
|
@@:
|
2011-10-14 23:38:50 +02:00
|
|
|
mov esi, [esp+4]
|
|
|
|
mov eax, [esi+WDATA.box.width]
|
|
|
|
sub eax, [ebp+SKIN_DATA.left.width]
|
|
|
|
sub eax, [ebp+SKIN_DATA.oper.width]
|
|
|
|
cmp eax, [ebp+SKIN_DATA.base.left]
|
|
|
|
jng .non_base
|
|
|
|
xor edx, edx
|
|
|
|
mov ecx, [ebp+SKIN_DATA.base.width]
|
|
|
|
jecxz .non_base
|
|
|
|
div ecx
|
|
|
|
inc eax
|
|
|
|
mov ebx, [ebp+SKIN_DATA.base.data]
|
|
|
|
mov ecx, [ebp+SKIN_DATA.base.width]
|
|
|
|
shl ecx, 16
|
|
|
|
add ecx, [_skinh]
|
|
|
|
mov edx, [ebp+SKIN_DATA.base.left]
|
|
|
|
sub edx, [ebp+SKIN_DATA.base.width]
|
|
|
|
shl edx, 16
|
2012-03-08 14:45:18 +01:00
|
|
|
.baseskinloop:
|
2011-10-14 23:38:50 +02:00
|
|
|
shr edx, 16
|
|
|
|
add edx, [ebp+SKIN_DATA.base.width]
|
|
|
|
shl edx, 16
|
|
|
|
|
|
|
|
push eax ebx ecx edx
|
2012-03-08 14:45:18 +01:00
|
|
|
or ebx, ebx
|
|
|
|
jz @f
|
|
|
|
call sys_putimage.forced
|
|
|
|
@@:
|
2011-10-14 23:38:50 +02:00
|
|
|
pop edx ecx ebx eax
|
|
|
|
|
|
|
|
dec eax
|
|
|
|
jnz .baseskinloop
|
2012-03-08 14:45:18 +01:00
|
|
|
.non_base:
|
2011-10-14 23:38:50 +02:00
|
|
|
mov esi, [esp+4]
|
|
|
|
mov edx, [esi+WDATA.box.width]
|
|
|
|
sub edx, [ebp+SKIN_DATA.oper.width]
|
|
|
|
inc edx
|
|
|
|
shl edx, 16
|
|
|
|
mov ebx, [ebp+SKIN_DATA.oper.data]
|
|
|
|
mov ecx, [ebp+SKIN_DATA.oper.width]
|
|
|
|
shl ecx, 16
|
|
|
|
add ecx, [_skinh]
|
2012-03-08 14:45:18 +01:00
|
|
|
or ebx, ebx
|
|
|
|
jz @f
|
|
|
|
call sys_putimage.forced
|
|
|
|
@@:
|
2011-10-14 23:38:50 +02:00
|
|
|
ret
|
2012-03-08 14:45:18 +01:00
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
align 4
|
2011-10-14 23:38:50 +02:00
|
|
|
drawwindow_IV:
|
|
|
|
;param1 - aw_yes
|
|
|
|
pusha
|
|
|
|
push edx
|
|
|
|
mov edi, edx
|
|
|
|
mov ebp, skin_active
|
|
|
|
cmp byte [esp+32+4+4], 0
|
|
|
|
jne @f
|
|
|
|
mov ebp, skin_inactive
|
2012-03-08 14:45:18 +01:00
|
|
|
@@:
|
2011-10-14 23:38:50 +02:00
|
|
|
mov eax, [edi+WDATA.box.left]
|
|
|
|
shl eax, 16
|
|
|
|
mov ax, word [edi+WDATA.box.left]
|
|
|
|
add ax, word [edi+WDATA.box.width]
|
|
|
|
mov ebx, [edi+WDATA.box.top]
|
|
|
|
shl ebx, 16
|
|
|
|
mov bx, word [edi+WDATA.box.top]
|
|
|
|
add bx, word [edi+WDATA.box.height]
|
|
|
|
mov esi, [ebp+SKIN_DATA.colors.outer]
|
2012-03-01 00:03:13 +01:00
|
|
|
or esi, 1 shl 25 ; 0x02000000 used for draw_rectangle without top line
|
|
|
|
ror ebx, 16
|
|
|
|
add ebx, [_skinh]
|
|
|
|
sub bx, 1
|
|
|
|
rol ebx, 16
|
2011-10-14 23:38:50 +02:00
|
|
|
call draw_rectangle
|
|
|
|
mov ecx, 3
|
2012-03-08 14:45:18 +01:00
|
|
|
_dw3l:
|
2011-10-14 23:38:50 +02:00
|
|
|
add eax, 1*65536-1
|
2012-03-01 00:03:13 +01:00
|
|
|
add ebx, 0*65536-1
|
2011-10-14 23:38:50 +02:00
|
|
|
test ax, ax
|
|
|
|
js no_skin_add_button
|
|
|
|
test bx, bx
|
|
|
|
js no_skin_add_button
|
|
|
|
mov esi, [ebp+SKIN_DATA.colors.frame];[edi+24]
|
2012-03-01 00:03:13 +01:00
|
|
|
or esi, 1 shl 25; 0x02000000 used for draw_rectangle without top line
|
2011-10-14 23:38:50 +02:00
|
|
|
call draw_rectangle
|
|
|
|
dec ecx
|
|
|
|
jnz _dw3l
|
|
|
|
mov esi, [ebp+SKIN_DATA.colors.inner]
|
2012-03-01 00:03:13 +01:00
|
|
|
or esi, 1 shl 25; 0x02000000 used for draw_rectangle without top line
|
2011-10-14 23:38:50 +02:00
|
|
|
add eax, 1*65536-1
|
2012-03-01 00:03:13 +01:00
|
|
|
add ebx, 0*65536-1
|
2011-10-14 23:38:50 +02:00
|
|
|
test ax, ax
|
|
|
|
js no_skin_add_button
|
|
|
|
test bx, bx
|
|
|
|
js no_skin_add_button
|
2012-03-15 10:47:22 +01:00
|
|
|
test [edi + WDATA.fl_wstate], WSTATE_ROLLEDUP
|
|
|
|
jnz @f
|
2011-10-14 23:38:50 +02:00
|
|
|
call draw_rectangle
|
2012-03-15 10:47:22 +01:00
|
|
|
@@:
|
2013-06-02 11:36:14 +02:00
|
|
|
mov eax, [skin_data]
|
|
|
|
cmp [eax], dword 'SKIN'
|
2011-10-14 23:38:50 +02:00
|
|
|
je @f
|
|
|
|
xor eax, eax
|
|
|
|
xor ebx, ebx
|
|
|
|
mov esi, [esp]
|
|
|
|
mov ecx, [esi+WDATA.box.width]
|
|
|
|
inc ecx
|
|
|
|
mov edx, [_skinh]
|
|
|
|
mov edi, [common_colours+4]; standard grab color
|
2012-03-12 19:26:37 +01:00
|
|
|
call vesa20_drawbar
|
2011-10-14 23:38:50 +02:00
|
|
|
jmp draw_clientbar
|
2012-03-08 14:45:18 +01:00
|
|
|
;--------------------------------------
|
|
|
|
align 4
|
|
|
|
@@:
|
2011-10-14 23:38:50 +02:00
|
|
|
mov al, [esp+32+4+4]
|
|
|
|
call drawwindow_IV_caption
|
2012-03-08 14:45:18 +01:00
|
|
|
draw_clientbar:
|
2011-10-14 23:38:50 +02:00
|
|
|
mov esi, [esp]
|
|
|
|
mov edx, [esi+WDATA.box.top] ; WORK AREA
|
|
|
|
add edx, 21+5
|
|
|
|
mov ebx, [esi+WDATA.box.top]
|
|
|
|
add ebx, [esi+WDATA.box.height]
|
|
|
|
cmp edx, ebx
|
|
|
|
jg _noinside2
|
|
|
|
mov eax, 5
|
|
|
|
mov ebx, [_skinh]
|
|
|
|
mov ecx, [esi+WDATA.box.width]
|
|
|
|
mov edx, [esi+WDATA.box.height]
|
|
|
|
sub ecx, 4
|
|
|
|
sub edx, 4
|
|
|
|
mov edi, [esi+WDATA.cl_workarea]
|
|
|
|
test edi, 0x40000000
|
|
|
|
jnz _noinside2
|
2012-03-12 19:26:37 +01:00
|
|
|
call vesa20_drawbar
|
2012-03-08 14:45:18 +01:00
|
|
|
_noinside2:
|
2013-06-02 11:36:14 +02:00
|
|
|
mov eax, [skin_data]
|
|
|
|
cmp [eax], dword 'SKIN'
|
2011-10-14 23:38:50 +02:00
|
|
|
jne no_skin_add_button
|
|
|
|
;* close button
|
|
|
|
mov edi, [BTN_ADDR]
|
|
|
|
movzx eax, word [edi]
|
|
|
|
cmp eax, 1000
|
|
|
|
jge no_skin_add_button
|
|
|
|
inc eax
|
|
|
|
mov [edi], ax
|
|
|
|
shl eax, 4
|
|
|
|
add eax, edi
|
|
|
|
|
2021-06-17 11:41:16 +02:00
|
|
|
mov bx, word [current_slot_idx]
|
2011-10-14 23:38:50 +02:00
|
|
|
mov [eax], bx
|
2016-01-07 17:29:25 +01:00
|
|
|
mov word [eax+2], 1 ; button id
|
2011-10-14 23:38:50 +02:00
|
|
|
xor ebx, ebx
|
|
|
|
cmp [skin_btn_close.left], 0
|
2016-01-07 17:29:25 +01:00
|
|
|
jge @f
|
2011-10-14 23:38:50 +02:00
|
|
|
mov ebx, [esp]
|
|
|
|
mov ebx, [ebx+WDATA.box.width]
|
|
|
|
inc ebx
|
2016-01-07 17:29:25 +01:00
|
|
|
@@:
|
2011-10-14 23:38:50 +02:00
|
|
|
add ebx, [skin_btn_close.left]
|
2016-01-07 17:29:25 +01:00
|
|
|
mov word [eax+4], bx ; x start
|
2011-10-14 23:38:50 +02:00
|
|
|
mov ebx, [skin_btn_close.width]
|
|
|
|
dec ebx
|
2016-01-07 17:29:25 +01:00
|
|
|
mov word [eax+6], bx ; x size
|
2011-10-14 23:38:50 +02:00
|
|
|
mov ebx, [skin_btn_close.top]
|
2016-01-07 17:29:25 +01:00
|
|
|
mov word [eax+8], bx ; y start
|
2011-10-14 23:38:50 +02:00
|
|
|
mov ebx, [skin_btn_close.height]
|
|
|
|
dec ebx
|
2016-01-07 17:29:25 +01:00
|
|
|
mov word [eax+10], bx ; y size
|
|
|
|
bts word [eax+12], 14
|
2011-10-14 23:38:50 +02:00
|
|
|
;* minimize button
|
|
|
|
mov edi, [BTN_ADDR]
|
|
|
|
movzx eax, word [edi]
|
|
|
|
cmp eax, 1000
|
|
|
|
jge no_skin_add_button
|
|
|
|
inc eax
|
|
|
|
mov [edi], ax
|
|
|
|
shl eax, 4
|
|
|
|
add eax, edi
|
|
|
|
|
2021-06-17 11:41:16 +02:00
|
|
|
mov bx, word [current_slot_idx]
|
2011-10-14 23:38:50 +02:00
|
|
|
mov [eax], bx
|
2016-01-07 17:29:25 +01:00
|
|
|
mov word [eax+2], -1 ; button id
|
2011-10-14 23:38:50 +02:00
|
|
|
xor ebx, ebx
|
|
|
|
cmp [skin_btn_minimize.left], 0
|
2016-01-07 17:29:25 +01:00
|
|
|
jge @f
|
2011-10-14 23:38:50 +02:00
|
|
|
mov ebx, [esp]
|
|
|
|
mov ebx, [ebx+WDATA.box.width]
|
|
|
|
inc ebx
|
2016-01-07 17:29:25 +01:00
|
|
|
@@:
|
2011-10-14 23:38:50 +02:00
|
|
|
add ebx, [skin_btn_minimize.left]
|
2016-01-07 17:29:25 +01:00
|
|
|
mov word [eax+4], bx ; x start
|
2011-10-14 23:38:50 +02:00
|
|
|
mov ebx, [skin_btn_minimize.width]
|
|
|
|
dec ebx
|
2016-01-07 17:29:25 +01:00
|
|
|
mov word [eax+6], bx ; x size
|
2011-10-14 23:38:50 +02:00
|
|
|
mov ebx, [skin_btn_minimize.top]
|
2016-01-07 17:29:25 +01:00
|
|
|
mov word [eax+8], bx ; y start
|
2011-10-14 23:38:50 +02:00
|
|
|
mov ebx, [skin_btn_minimize.height]
|
|
|
|
dec ebx
|
2016-01-07 17:29:25 +01:00
|
|
|
mov word [eax+10], bx ; y size
|
|
|
|
bts word [eax+12], 14
|
2012-03-08 14:45:18 +01:00
|
|
|
no_skin_add_button:
|
2011-10-14 23:38:50 +02:00
|
|
|
pop edi
|
|
|
|
popa
|
|
|
|
ret 4
|