From 8dc118d9bf685d96022a010fb2a20d724c40b5cf Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Tue, 14 May 2024 19:11:24 -0500 Subject: Add help menu --- lib/headlines.ml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/headlines.ml') 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 -- cgit v1.2.3