mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-20 03:25:47 +00:00
demo: handle remaining menu inputs
This commit is contained in:
parent
d3c26320ef
commit
ab8417e488
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user