Misc updates

This commit is contained in:
Jonathan Daugherty 2015-05-09 01:23:25 -07:00
parent 5e91b0b617
commit 857faebbf6
2 changed files with 9 additions and 10 deletions

View File

@ -15,11 +15,10 @@ data St =
drawUI :: St -> Widget
drawUI st =
let ew = edit (stEditor st)
in vBox [ ew `withAttr` (cyan `on` blue)
, hBorder '-'
, "stuff and things"
]
vBox [ edit (stEditor st) `withAttr` (cyan `on` blue)
, hBorder '-'
, "stuff and things"
]
handleEvent :: Event -> St -> Either ExitCode St
handleEvent e st =
@ -36,10 +35,10 @@ pickCursor st ls =
initialState :: St
initialState =
let eName = Name "edit"
St { msg = ""
, focus = focusRing [eName]
, stEditor = editor eName ""
}
in St { msg = ""
, focus = focusRing [eName]
, stEditor = editor eName ""
}
main :: IO ()
main = standardIOConfig

View File

@ -41,7 +41,7 @@ data Editor =
}
editor :: Name -> String -> Editor
editor name s = Editor s (length name) name
editor name s = Editor s (length s) name
edit :: Editor -> Widget
edit e =