mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-11-22 23:15:59 +03:00
brick-layer-demo: nit
This commit is contained in:
parent
696ae5c467
commit
ca36492dec
@ -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 ()
|
||||||
|
Loading…
Reference in New Issue
Block a user