mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-11-29 10:54:48 +03:00
Misc updates
This commit is contained in:
parent
189ebe1298
commit
4fc7813918
@ -14,12 +14,11 @@ data St =
|
||||
|
||||
drawUI :: St -> Widget
|
||||
drawUI st =
|
||||
hBox [ hLimit 25 $ vBox [ "-- header --"
|
||||
, (txt (msg st)) `withNamedCursor` (Name "bar", Location (length $ msg st, 0))
|
||||
] `withAttr` (fg red)
|
||||
, vBorder '|'
|
||||
, "stuff things" `withNamedCursor` (Name "foo", Location (0, 0))
|
||||
]
|
||||
let editor = txt (msg st) `withNamedCursor` (Name "edit", Location (length $ msg st, 0))
|
||||
in vBox [ editor `withAttr` (cyan `on` blue)
|
||||
, hBorder '-'
|
||||
, "stuff and things"
|
||||
]
|
||||
|
||||
handleEvent :: Event -> St -> Either ExitCode St
|
||||
handleEvent e st =
|
||||
@ -36,7 +35,7 @@ pickCursor st ls =
|
||||
initialState :: St
|
||||
initialState =
|
||||
St { msg = ""
|
||||
, focus = focusRing [Name "foo", Name "bar"]
|
||||
, focus = focusRing [Name "edit"]
|
||||
}
|
||||
|
||||
main :: IO ()
|
||||
|
Loading…
Reference in New Issue
Block a user