Advertisement
aokmikey

Bo2 DrawText

Oct 19th, 2014
1,343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.69 KB | None | 0 0
  1. // Made by someone
  2. // Modified and made better by aokmikey :)
  3.  
  4. // Least used arguments last
  5. // Last used arguments put in if statments to not set if not used
  6. // self added. Not sure if needed
  7. // take out the need for the font.
  8. // font is normally default so it is a mostly unused argument
  9. // shortens code :)
  10.  
  11. drawText(txt, align, relative, x, y, fontScale, color, alpha, font, sort)
  12. {
  13.     text = createFontString((isDefined(font) ? font : "default"), fontScale, self);
  14.     text setPoint(align, relative, x, y);
  15.     text setText(txt);
  16.     if( isDefined(color) )
  17.         text.color = color;
  18.     if( isDefined(alpha) )
  19.         text.alpha = alpha;
  20.     if( isDefined(sort) )
  21.         text.sort = sort;  
  22.     return text;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement