allow drawing functions to set cursor visibility

This commit is contained in:
Jonathan Lamothe
2019-08-22 16:53:31 -04:00
parent def2af7e64
commit 7e93b329b2
2 changed files with 8 additions and 3 deletions

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