code bluebar
      push dword [xy]
	push dword [fore]
	$color 7Fh		;erase bottom line
      embed 'vc @ 1 - 8 * 0 at'
	upsh [hp]
      upsh ih
	call rect
	$color 14		;text color
      embed 'vc @ 1 - 8 * 0 at'
    	upsh tib
	upsh [tp]
	sub eax,[esi]
%ifdef legacy
	dup		;set x coordinate to right-justify text
      mov eax,dword [hc]
      sub eax,1
	sub eax,[esi]
      imul eax,iw
	mov [xy+2],ax
      drop
%endif
	call type
	pop dword [fore]
	pop dword [xy]
next
