diff options
author | Marc Coquand <marc@mccd.space> | 2024-05-14 19:11:24 -0500 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-05-14 19:11:24 -0500 |
commit | 8dc118d9bf685d96022a010fb2a20d724c40b5cf (patch) | |
tree | ce99ac0f13c0f8407bbde30630366b9143ef7558 /lib/headlines.ml | |
parent | a76fb32e7c5815e37b5772f15326f00ec58a322d (diff) | |
download | stitch-8dc118d9bf685d96022a010fb2a20d724c40b5cf.tar.gz stitch-8dc118d9bf685d96022a010fb2a20d724c40b5cf.tar.bz2 stitch-8dc118d9bf685d96022a010fb2a20d724c40b5cf.zip |
Add help menu
Diffstat (limited to 'lib/headlines.ml')
-rw-r--r-- | lib/headlines.ml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/headlines.ml b/lib/headlines.ml index 1435c5c..b30903d 100644 --- a/lib/headlines.ml +++ b/lib/headlines.ml @@ -3,6 +3,7 @@ module Common = Common open Notty module Input_screen = Input_screen module Stitched_article = Stitched_article +module Help_screen = Help_screen type state = { pos : int * int @@ -46,6 +47,7 @@ let rec render t ({ pos; scroll; content; content_pretty } as state) = | `Resize _ -> render t state | `Mouse ((`Press _ | `Drag), (_, y), _) -> render t { state with pos = 0, min y content_length } + | `Key (`ASCII '?', []) -> Help_screen.render t { go_back = (fun () -> render t state) } | `Key (`ASCII '@', []) -> let content = Array.map |