Move moves the cursor relative by x and y.
(x, y int)
| 121 | |
| 122 | // Move moves the cursor relative by x and y. |
| 123 | func Move(x, y int) { |
| 124 | if x > 0 { |
| 125 | Right(x) |
| 126 | } else if x < 0 { |
| 127 | x *= -1 |
| 128 | Left(x) |
| 129 | } |
| 130 | |
| 131 | if y > 0 { |
| 132 | Up(y) |
| 133 | } else if y < 0 { |
| 134 | y *= -1 |
| 135 | Down(y) |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | // ClearLinesUp clears n lines upwards from the current position and moves the cursor. |
| 140 | func ClearLinesUp(n int) { |