/vsdrawtext
Posted by Parasite-FT-
Friday, July 23, 2004
Description: draws vertical text methinks
;; vertical scroll drawtext
; Usage: /vsdrawtext -porhn @window <color> <color> [fontname fontsize] <x> <y> <w> <h> <text>
; x y w h are all values of the text area
alias vsdrawtext {
var %switches = $iif(-* iswm $1,1), %i = 1
while ($gettok(window colour bgcolour font fontsize x y w h,%i,32)) { set -l % [ $+ [ $ifmatch ] ] $gettok($1-,$calc(%switches + %i),32) | inc %i }
var %text = $iif(%switches,$11-,$10-), %textheight = $height(%text,%font,%fontsize)
if (!$window(%window)) { echo $color(info) -s * /vsdrawtext: invalid window | return }
elseif (!%text) { echo $color(info) -s * /vsdrawtext: invalid parameters | return }
drawscroll $iif(-*n* iswm $1,-n) %window 0 $+(-,%textheight) %x $calc(%y + %textheight) %w %h
drawrect -fr %window %bgcolour 0 %x $calc(%y + %h - %textheight) %w %textheight
drawtext -bc $+ $remove($iif(%window == $2,$1),-) %window %colour %bgcolour %font %fontsize %x $calc(%y + %h - %textheight) %w %textheight %text
}