From ab8417e488af5bf76ab64e795936f2acc7e047f0 Mon Sep 17 00:00:00 2001 From: nick black Date: Mon, 10 Feb 2020 00:38:34 -0500 Subject: [PATCH] demo: handle remaining menu inputs --- src/demo/hud.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/demo/hud.c b/src/demo/hud.c index 186811c46..7442f9fb6 100644 --- a/src/demo/hud.c +++ b/src/demo/hud.c @@ -65,11 +65,22 @@ bool menu_or_hud_key(const struct ncinput *ni){ if(!menu){ return false; } - if((ni->id == 'o' || ni->id == 'O') && ni->alt && !ni->ctrl){ + if(ni->id == 'o' && ni->alt && !ni->ctrl){ if(ncmenu_unroll(menu, 0) == 0){ menu_unrolled = true; } return true; + }else if(ni->id == 'h' && ni->alt && !ni->ctrl){ + if(ncmenu_unroll(menu, 2) == 0){ + menu_unrolled = true; + } + return true; + }else if(ni->id == '\x1b'){ + if(menu_unrolled){ + ncmenu_rollup(menu); + menu_unrolled = false; + return true; + } }else if(ni->id == NCKEY_UP){ if(!menu_unrolled){ return false;