mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-09-11 23:57:22 +03:00
Dialog demo: improve dialog appearance
This commit is contained in:
parent
12d4cf705a
commit
d2bcb98fb3
@ -7,6 +7,7 @@ import Graphics.Vty hiding (translate)
|
||||
import Brick.Main
|
||||
import Brick.Widgets.Core
|
||||
import Brick.Widgets.Dialog
|
||||
import Brick.Widgets.Center
|
||||
import Brick.AttrMap
|
||||
import Brick.Util
|
||||
import Brick.Types
|
||||
@ -17,7 +18,7 @@ data Choice = Red | Blue | Green
|
||||
drawUI :: Dialog Choice -> [Widget]
|
||||
drawUI d = [ui]
|
||||
where
|
||||
ui = renderDialog d $ str "This is the dialog body."
|
||||
ui = renderDialog d $ hCenter $ padAll (Pad 1) $ str "This is the dialog body."
|
||||
|
||||
appEvent :: Dialog Choice -> Event -> EventM (Next (Dialog Choice))
|
||||
appEvent d ev =
|
||||
|
Loading…
Reference in New Issue
Block a user