on master help sign in
Change how some text is centered.
b5b87f2evancz
Examples/elm-js/Pong/Pong.elm+1−1
@@ -296,7 +296,7 @@ gameState = foldp stepGame defaultGame input
296scoreBoard w inPlay p1 p2 =
296scoreBoard w inPlay p1 p2 =
297 let { code = text . monospace . toText
297 let { code = text . monospace . toText
298 ; stack top bottom = flow down [ code " ", code top, code bottom ]
298 ; stack top bottom = flow down [ code " ", code top, code bottom ]
299− ; msg = width w . box 2 . text . monospace $ toText "Press SPACE to begin"
299+ ; msg = width w . centeredText . monospace $ toText "Press SPACE to begin"
300 ; score = width w . box 2 $ flow right
300 ; score = width w . box 2 $ flow right
301 [ stack "W" "S", rectangle 20 1
301 [ stack "W" "S", rectangle 20 1
302 , text . Text.height 4 $ show p1 ++ toText " " ++ show p2
302 , text . Text.height 4 $ show p1 ++ toText " " ++ show p2