mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-09-11 15:55:54 +03:00
Add a basic fill demonstration program
This commit is contained in:
parent
b8af7dcd85
commit
c7182aa448
13
brick.cabal
13
brick.cabal
@ -286,6 +286,19 @@ executable brick-custom-event-demo
|
||||
microlens >= 0.3.0.0,
|
||||
microlens-th
|
||||
|
||||
executable brick-fill-demo
|
||||
if !flag(demos)
|
||||
Buildable: False
|
||||
hs-source-dirs: programs
|
||||
ghc-options: -threaded -Wall -fno-warn-unused-do-bind -O3
|
||||
default-language: Haskell2010
|
||||
main-is: FillDemo.hs
|
||||
build-depends: base <= 5,
|
||||
brick,
|
||||
vty >= 5.15,
|
||||
text,
|
||||
microlens
|
||||
|
||||
executable brick-hello-world-demo
|
||||
if !flag(demos)
|
||||
Buildable: False
|
||||
|
12
programs/FillDemo.hs
Normal file
12
programs/FillDemo.hs
Normal file
@ -0,0 +1,12 @@
|
||||
module Main where
|
||||
|
||||
import Brick
|
||||
|
||||
ui :: Widget ()
|
||||
ui = vBox [ str "This text is at the top."
|
||||
, fill ' '
|
||||
, str "This text is at the bottom."
|
||||
]
|
||||
|
||||
main :: IO ()
|
||||
main = simpleMain ui
|
Loading…
Reference in New Issue
Block a user