demo: destory about screen before restarting #706

pull/710/head
nick black 4 years ago
parent e74e7860c5
commit dc49bb943b
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -515,6 +515,7 @@ int main(int argc, char** argv){
if(fpsgraph_stop(nc)){
goto err;
}
about_destroy(nc);
}while(restart_demos);
if(stop_input()){
goto err;

@ -205,6 +205,9 @@ int hud_completion_notify(const demoresult* result);
const demoresult* demoresult_lookup(int idx);
/*----------------------------------HUD----------------------------------*/
// destroy about popup
void about_destroy(struct notcurses* nc);
// returns true if the input was handled by the menu/HUD
bool menu_or_hud_key(struct notcurses *nc, const struct ncinput *ni);

@ -119,6 +119,12 @@ about_toggle(struct notcurses* nc){
ncplane_destroy(n);
}
void about_destroy(struct notcurses* nc){
if(about){
about_toggle(nc);
}
}
static void
hud_toggle(struct notcurses* nc){
ncmenu_rollup(menu);

Loading…
Cancel
Save