diff options
| author | Cody <cody@codyq.dev> | 2023-06-28 14:28:43 -0500 |
|---|---|---|
| committer | Cody <cody@codyq.dev> | 2023-06-28 14:28:43 -0500 |
| commit | da89b3f6cdf17dbaeba9aa25e22f1b8313f97536 (patch) | |
| tree | 4ef0b3f5c9f56a872b7387437590baebbf29a5ed /std | |
| parent | 2cf498f7bf1311ebca156315a0c9ac25b0addef5 (diff) | |
| download | sloth-da89b3f6cdf17dbaeba9aa25e22f1b8313f97536.tar.gz | |
Cursor hiding in conways game of life
Diffstat (limited to 'std')
| -rw-r--r-- | std/stdio.c | 8 | ||||
| -rw-r--r-- | std/stdio.sloth | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/std/stdio.c b/std/stdio.c index d3ff5a0..f6dbeaf 100644 --- a/std/stdio.c +++ b/std/stdio.c @@ -18,3 +18,11 @@ void termpos(int x, int y) { void termclear() { printf("\x1b[2J\x1b[H"); } + +void curshide() { + print("\x1b[?25l"); +} + +void cursshow() { + print("\x1b[?25h"); +} diff --git a/std/stdio.sloth b/std/stdio.sloth index c28d474..77c9af0 100644 --- a/std/stdio.sloth +++ b/std/stdio.sloth @@ -1,6 +1,9 @@ foreign fn print(str: String) Void; foreign fn readln() String; +foreign fn curshide(); +foreign fn cursshow(); + fn println(str: String) Void { print(str); print("\n"); |
