xkonti

textXAPI v. 0.0.5

Mar 18th, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. -----------------
  2. --  textXAPI   --
  3. --  by Xkonti  --
  4. -----------------
  5.  
  6. function offsetToCenter(text, length)
  7.  
  8.     local offset
  9.     offset = math.floor( (length - string.len(text) ) / 2)
  10.     return offset
  11.    
  12. end
  13.  
  14. function offsetToRight(text, length)
  15.  
  16.     local offset = math.floor( length - string.len(text) )
  17.     return offset
  18.    
  19. end
Add Comment
Please, Sign In to add comment