diff options
| author | Rob Hoelz <rob@hoelz.ro> | 2012-09-15 00:40:09 +0200 |
|---|---|---|
| committer | Rob Hoelz <rob@hoelz.ro> | 2012-09-15 00:40:09 +0200 |
| commit | 68a8f1005aabc69ec5bc979fa7d7873c3c2a6a1b (patch) | |
| tree | b3667856f2a5914e67bfc96ec8fa509ff5787855 | |
| parent | e3cad60d767ebbcdb265068f7ea94d7977597181 (diff) | |
| download | lua-term-68a8f1005aabc69ec5bc979fa7d7873c3c2a6a1b.tar.gz lua-term-68a8f1005aabc69ec5bc979fa7d7873c3c2a6a1b.tar.bz2 lua-term-68a8f1005aabc69ec5bc979fa7d7873c3c2a6a1b.zip | |
Add examples for new functions to README
| -rw-r--r-- | README.md | 13 |
1 files changed, 13 insertions, 0 deletions
| @@ -20,4 +20,17 @@ Usage | |||
| 20 | print(color.red 'hello') | 20 | print(color.red 'hello') |
| 21 | print(color.red .. 'hello' .. color.reset) | 21 | print(color.red .. 'hello' .. color.reset) |
| 22 | print(color.red, 'hello', color.reset) | 22 | print(color.red, 'hello', color.reset) |
| 23 | |||
| 24 | -- The following functions take an optional IO handle (like io.stdout); | ||
| 25 | -- io.stdout is the default if you don't specify one | ||
| 26 | term.clear() -- clears the screen | ||
| 27 | term.cleareol() -- clears from the cursor to the end of the line | ||
| 28 | term.cursor.goto(1, 1) | ||
| 29 | term.cursor.goto(io.stdout, 1, 1) | ||
| 30 | term.cursor.goup(1) | ||
| 31 | term.cursor.godown(1) | ||
| 32 | term.cursor.goright(1) | ||
| 33 | term.cursor.goleft(1) | ||
| 34 | term.cursor.save() -- save position | ||
| 35 | term.cursor.restore() -- restore position | ||
| 23 | ``` | 36 | ``` |
