Skip to content

Commit

Permalink
brick-layer-demo: nit
Browse files Browse the repository at this point in the history
  • Loading branch information
jtdaugherty committed Nov 21, 2024
1 parent 696ae5c commit ca36492
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions programs/LayerDemo.hs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ drawUi st =
[ C.centerLayer $
B.border $ str "This layer is centered but other\nlayers are placed underneath it."
, arrowLayer
, middleLayer st
, bottomLayer st
, middleLayer (st^.middleLayerLocation)
, bottomLayer (st^.bottomLayerLocation)
]

arrowLayer :: Widget Name
Expand All @@ -59,15 +59,15 @@ arrowLayer =
withDefAttr arrowAttr $
str msg

middleLayer :: St -> Widget Name
middleLayer st =
translateBy (st^.middleLayerLocation) $
middleLayer :: Location -> Widget Name
middleLayer l =
translateBy l $
reportExtent MiddleLayerElement $
B.border $ str "Middle layer\n(Arrow keys move)"

bottomLayer :: St -> Widget Name
bottomLayer st =
translateBy (st^.bottomLayerLocation) $
bottomLayer :: Location -> Widget Name
bottomLayer l =
translateBy l $
B.border $ str "Bottom layer\n(Ctrl-arrow keys move)"

appEvent :: T.BrickEvent Name e -> T.EventM Name St ()
Expand Down

0 comments on commit ca36492

Please sign in to comment.