Advertisement
Guest User

wecho, wechoLink, and wsetFgColor

a guest
Oct 15th, 2012
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1.  
  2. --Same as echo() except that "main" can be used to denote the main window and avoid additional conditionals.
  3.  
  4. function wecho(win,arg)
  5.   if not win or win:lower() == "main" then
  6.     echo(arg)
  7.   else
  8.     echo(win,arg)
  9.   end--if
  10. end--wecho
  11.  
  12.  
  13. --Same as echoLink except that "main" can be used to denote the main window and avoid additional conditionals.
  14.  
  15. function wechoLink(win,text,command,hint,bool)
  16.   if not win or win:lower() == "main" then
  17.     echoLink(text, command, hint, bool)
  18.   else
  19.     echoLink(win, text, command, hint, bool)
  20.   end--if
  21. end--wechoLink
  22.  
  23.  
  24. --Same as setFgColor except that "main" can be used to denote the main window and avoid additional conditionals.
  25.  
  26. function wsetFgColor(win,r,g,b)
  27.   if not win or win:lower() == "main" then
  28.     setFgColor(r,g,b)
  29.   else
  30.     setFgColor(win,r,g,b)
  31.   end--if
  32. end--wsetFgColor
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement