brick-layer-demo: nit

This commit is contained in:
Jonathan Daugherty 2024-11-21 15:30:53 -08:00
parent 696ae5c467
commit ca36492dec

View File

@ -46,8 +46,8 @@ drawUi st =
[ C.centerLayer $ [ C.centerLayer $
B.border $ str "This layer is centered but other\nlayers are placed underneath it." B.border $ str "This layer is centered but other\nlayers are placed underneath it."
, arrowLayer , arrowLayer
, middleLayer st , middleLayer (st^.middleLayerLocation)
, bottomLayer st , bottomLayer (st^.bottomLayerLocation)
] ]
arrowLayer :: Widget Name arrowLayer :: Widget Name
@ -59,15 +59,15 @@ arrowLayer =
withDefAttr arrowAttr $ withDefAttr arrowAttr $
str msg str msg
middleLayer :: St -> Widget Name middleLayer :: Location -> Widget Name
middleLayer st = middleLayer l =
translateBy (st^.middleLayerLocation) $ translateBy l $
reportExtent MiddleLayerElement $ reportExtent MiddleLayerElement $
B.border $ str "Middle layer\n(Arrow keys move)" B.border $ str "Middle layer\n(Arrow keys move)"
bottomLayer :: St -> Widget Name bottomLayer :: Location -> Widget Name
bottomLayer st = bottomLayer l =
translateBy (st^.bottomLayerLocation) $ translateBy l $
B.border $ str "Bottom layer\n(Ctrl-arrow keys move)" B.border $ str "Bottom layer\n(Ctrl-arrow keys move)"
appEvent :: T.BrickEvent Name e -> T.EventM Name St () appEvent :: T.BrickEvent Name e -> T.EventM Name St ()