allow drawing functions to set cursor visibility

This commit is contained in:
Jonathan Lamothe
2019-08-24 09:41:23 -04:00
parent def2af7e64
commit 7e93b329b2
2 changed files with 8 additions and 3 deletions
+4 -2
View File
@@ -38,8 +38,10 @@ import Mtlstats.Types
import Mtlstats.Types.Menu
-- | The draw function for a 'Menu'
drawMenu :: Menu a -> C.Update ()
drawMenu = C.drawString . show
drawMenu :: Menu a -> C.Update C.CursorMode
drawMenu m = do
C.drawString $ show m
return C.CursorInvisible
-- | The event handler for a 'Menu'
menuHandler :: Menu a -> C.Event -> Action a