From 48bb86278826a08e2550f2c49e695167fb137957 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 25 Jun 2015 09:25:49 -0700 Subject: 1655 - first attempt at smooth refresh: hide-cursor But it doesn't work, because moving the cursor inside 'render' also starts displaying it again. --- 071print.mu | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to '071print.mu') 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 -- cgit 1.4.1-2-gfad0