Skip to content
Anthony Ma edited this page May 26, 2015 · 1 revision

Utilities to aid in UI design #Fields None

#Functions

  • function drawRect(self, x, y, w, h, color) - draw a rectangle from x, y with the width and height in w, h
  • function alignText(self, alignment, textLength, x, w) - returns the x on the terminal of where to put the cursor of the aligned text
  • function wrapText(self, text, limit) - wraps text with '\n' at the supplied limit
  • function splitText(self, str, pat) - splits text into table by supplied pattern

Clone this wiki locally