Modify some example behaviour
Getty Ritter
8 years ago
| 14 | 14 | , Brick.str " move with {h,j,k,l}" |
| 15 | 15 | , Brick.str " expand with {H,J,K,L}" |
| 16 | 16 | , Brick.str " contract with M-{h,j,k,l}" |
| 17 |
, Brick.str " increment the current |
|
| 17 | , Brick.str " increment the currently focused cells with enter" | |
| 18 | 18 | , Brick.str " quit with q or ESC" |
| 19 | 19 | , Brick.str ("Current selection: " ++ show (getFocused s)) |
| 20 | 20 | ]] |
| 30 | 30 | _ -> Brick.continue s |
| 31 | 31 | , Brick.appStartEvent = return |
| 32 | 32 | , Brick.appAttrMap = \ _ -> |
| 33 |
Brick.attrMap |
|
| 33 | Brick.attrMap (Vty.withForeColor Vty.defAttr Vty.white) | |
| 34 | [ ("selected", Vty.withStyle Vty.defAttr Vty.reverseVideo) ] | |
| 34 | 35 | } |
| 35 | 36 | |
| 36 | 37 | drawElem :: Int -> Bool -> Brick.Widget n |
| 37 |
drawElem n True = Brick. |
|
| 38 | drawElem n True = Brick.withAttr "selected" $ Brick.str (show n) | |
| 38 | 39 | drawElem n False = Brick.str (show n) |
| 39 | 40 | |
| 40 | 41 | main :: IO () |