gdritter repos brick-table / 28e8648
Modify some example behaviour Getty Ritter 3 years ago
1 changed file(s) with 4 addition(s) and 3 deletion(s). Collapse all Expand all
1414 , Brick.str " move with {h,j,k,l}"
1515 , Brick.str " expand with {H,J,K,L}"
1616 , Brick.str " contract with M-{h,j,k,l}"
17 , Brick.str " increment the current cells with enter"
17 , Brick.str " increment the currently focused cells with enter"
1818 , Brick.str " quit with q or ESC"
1919 , Brick.str ("Current selection: " ++ show (getFocused s))
2020 ]]
3030 _ -> Brick.continue s
3131 , Brick.appStartEvent = return
3232 , Brick.appAttrMap = \ _ ->
33 Brick.attrMap mempty [("selected", Vty.withForeColor Vty.defAttr Vty.red)]
33 Brick.attrMap (Vty.withForeColor Vty.defAttr Vty.white)
34 [ ("selected", Vty.withStyle Vty.defAttr Vty.reverseVideo) ]
3435 }
3536
3637 drawElem :: Int -> Bool -> Brick.Widget n
37 drawElem n True = Brick.str ("*" ++ show n ++ "*")
38 drawElem n True = Brick.withAttr "selected" $ Brick.str (show n)
3839 drawElem n False = Brick.str (show n)
3940
4041 main :: IO ()