diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-06-25 09:25:49 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-06-25 09:25:49 -0700 |
commit | 48bb86278826a08e2550f2c49e695167fb137957 (patch) | |
tree | 7428588a5270d1c867706ec722d2103e4d4401bb /071print.mu | |
parent | ec3aa9e03f1c97e5dd904a448f3b73386a6a4e67 (diff) | |
download | mu-48bb86278826a08e2550f2c49e695167fb137957.tar.gz |
1655 - first attempt at smooth refresh: hide-cursor
But it doesn't work, because moving the cursor inside 'render' also starts displaying it again.
Diffstat (limited to '071print.mu')
-rw-r--r-- | 071print.mu | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/071print.mu b/071print.mu index 9fcfb018..a5cb191b 100644 --- a/071print.mu +++ b/071print.mu @@ -533,6 +533,32 @@ recipe screen-height [ reply height:number ] +recipe hide-cursor [ + default-space:address:array:location <- new location:type, 30:literal + x:address:screen <- next-ingredient + # if x exists (not real display), do nothing + { + break-unless x:address:screen + reply x:address:screen + } + # otherwise, real screen + hide-cursor-on-display + reply x:address:screen +] + +recipe show-cursor [ + default-space:address:array:location <- new location:type, 30:literal + x:address:screen <- next-ingredient + # if x exists (not real display), do nothing + { + break-unless x:address:screen + reply x:address:screen + } + # otherwise, real screen + show-cursor-on-display + reply x:address:screen +] + recipe print-string [ default-space:address:array:location <- new location:type, 30:literal x:address:screen <- next-ingredient |