Code:
; /drawtest <text color number>
alias drawtest {
  var %win = @drawtest
  if ($window(%win)) { window -c %win }
  window -pCBk0d +bnf %win 0 0 178 150

  var %c(te) = $1

  var %c(bg) = 00, %c(bo) = 01, %c(fi) = 15, %font = Tahoma
  var %x = 30, %y = 30, %w = 115, %h = 60, %e = 18
  drawfill %win %c(bg) %c(bg) 0 0
  drawrect -dn %win %c(bo) 0 %x %y %w %h %e %e
  drawrect -fdn %win %c(fi) 0 $calc(%x +1) $calc(%y +1) $calc(%w -2) $calc(%h -2) %e %e
  drawtext -n %win %c(te) %font 25 $calc(%x +10) $calc(%y +15) TEST %c(te)
  drawpic %win
}

6.35 draws the text in white for "/drawtest 00" and in black for "/drawtest 01" - as expected.
7.00 beta16 oddly draws in white (or better: in color 00) for both commands smirk...

PS: Big Thanks for the new version! smile
PPS, as related to colors: In general, I like the new internal check for "same foreground/background colors". Scripted sollutions had been a bit long winded. However, now there's no way left to "enforce" same colors (for whatever reason)... maybe new switches for echo and aline...? But then, I'm sure there will be a discussion about the feature anyway and I don't want to anticipate it here in bug reports.

Last edited by Horstl; 03/04/10 01:52 AM.