mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-12-26 15:33:30 +03:00
guide: update for vty 6
This commit is contained in:
parent
250c8b471b
commit
c1eeeb1d01
@ -13,7 +13,9 @@ pattern-matching on incoming events and updating your application state.
|
||||
|
||||
Under the hood, this library builds upon
|
||||
[vty](http://hackage.haskell.org/package/vty), so some knowledge of Vty
|
||||
will be necessary to use this library.
|
||||
will be necessary to use this library. Brick depends on
|
||||
`vty-crossplatform`, so Brick should work anywhere Vty works (Unix and
|
||||
Windows).
|
||||
|
||||
Example
|
||||
-------
|
||||
@ -185,8 +187,8 @@ Reporting bugs
|
||||
Please file bug reports as GitHub issues. For best results:
|
||||
|
||||
- Include the versions of relevant software packages: your terminal
|
||||
emulator, `brick`, `ghc`, and `vty` will be the most important
|
||||
ones.
|
||||
emulator, `brick`, `ghc`, `vty`, and Vty platform packages will be
|
||||
the most important ones.
|
||||
|
||||
- Clearly describe the behavior you expected ...
|
||||
|
||||
|
@ -53,6 +53,13 @@ To clone and build locally::
|
||||
$ cd brick
|
||||
$ cabal new-build
|
||||
|
||||
Your package will need some dependencies:
|
||||
|
||||
* ``brick``,
|
||||
* ``vty >= 6.0``, and
|
||||
* ``vty-crossplatform`` or ``vty-unix`` or ``vty-windows``, depending
|
||||
on which platform(s) your application supports.
|
||||
|
||||
Building the Demonstration Programs
|
||||
-----------------------------------
|
||||
|
||||
@ -403,7 +410,7 @@ our events over that channel. Once we've created the channel with
|
||||
main :: IO ()
|
||||
main = do
|
||||
eventChan <- Brick.BChan.newBChan 10
|
||||
let buildVty = Graphics.Vty.mkVty Graphics.Vty.defaultConfig
|
||||
let buildVty = Graphics.Vty.CrossPlatform.mkVty Graphics.Vty.Config.defaultConfig
|
||||
initialVty <- buildVty
|
||||
finalState <- customMain initialVty buildVty
|
||||
(Just eventChan) app initialState
|
||||
|
Loading…
Reference in New Issue
Block a user