mouse: { if ($hget($active)) {
var %exid = $regsubex($str(a,$hget($v1,0).item),/a/g,$+($isclick($mouse.x,$mouse.y,$gettok($hget($v1,\n).data,2-6,32),\n),.))
if (*... !iswm %exid) {
gui.draw button @GUI 2 20 25 180 20 Close
}
var %exid = $regsubex($str(a,$hget($v1,0).item),/a/g,$+($isclick($mouse.x,$mouse.y,$gettok($hget($v1,\n).data,2-6,32),\n),.))
if (*... iswm %exid) {
tokenize 32 button $active 2 20 25 180 20 Close
drawrect -frn $2 $rgb(247,242,255) 1 $4 $calc($5 + 25) $6 $7
drawrect -frn $2 $rgb(224,220,250) 1 $calc($4 + 2) $calc($5 + 2 + 25) $calc($6 - 2) $calc($7 - 2)
drawrect -rn $2 $rgb(191,186,195) 1 $4 $calc($5 + 25) $6 $7
$iif($8, drawtext -rn $active $rgb(202,197,215) Verdana 12 $calc($4 + $6 / 2 - $width($8-,Verdana,12) / 2 + 1) $calc($5 + $7 / 2 - $height($8-,Verdana,12) / 2 + 1 + 25) $8-, )
$iif($8, drawtext -rn $active $rgb(26,26,26) Verdana 12 $calc($4 + $6 / 2 - $width($8-,Verdana,12) / 2) $calc($5 + $7 / 2 - $height($8-,Verdana,12) / 2 + 25) $8-, )
drawdot $active
}
} }
sclick: { if ($hget($active) == $active) {
tokenize 32 button $active 2 20 25 180 20 Close
if ($inrect($mouse.x,$mouse.y,20,55,180,20)) {
drawrect -frn $active $rgb(202,197,215) 1 $4 $calc($5 + 25) $6 $7
drawrect -frn $active $rgb(184,180,200) 1 $4 $calc($5 + 25) $calc($6 - 2) $calc($7 - 2)
drawrect -rn $active $rgb(151,146,155) 1 $4 $calc($5 + 25) $6 $7
$iif($8, drawtext -rn $active $rgb(202,197,215) Verdana 12 $calc($4 + $6 / 2 - $width($8-,Verdana,12) / 2 + 1) $calc($5 + $7 / 2 - $height($8-,Verdana,12) / 2 + 1 + 25) $8-, )
$iif($8, drawtext -rn $active $rgb(26,26,26) Verdana 12 $calc($4 + $6 / 2 - $width($8-,Verdana,12) / 2) $calc($5 + $7 / 2 - $height($8-,Verdana,12) / 2 + 25) $8-, )
drawdot $active
} } }