From 04a7736112b387fb1469b922cd4f99664e07d0f5 Mon Sep 17 00:00:00 2001 From: nick black Date: Thu, 11 Mar 2021 22:36:43 -0500 Subject: [PATCH] demo: move fpsgraph/hud to another pile when hidden #1402 --- src/demo/hud.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/demo/hud.c b/src/demo/hud.c index b27019092..5d755dbed 100644 --- a/src/demo/hud.c +++ b/src/demo/hud.c @@ -196,8 +196,9 @@ hud_toggle(struct notcurses* nc){ } hud_hidden = !hud_hidden; if(hud_hidden){ - ncplane_move_bottom(hud); + ncplane_reparent(hud, hud); }else{ + ncplane_reparent(hud, notcurses_stdplane(nc)); ncplane_move_top(hud); } demo_render(nc); @@ -211,8 +212,9 @@ fpsplot_toggle(struct notcurses* nc){ } plot_hidden = !plot_hidden; if(plot_hidden){ - ncplane_move_bottom(ncuplot_plane(plot)); + ncplane_reparent(ncuplot_plane(plot), ncuplot_plane(plot)); }else{ + ncplane_reparent(ncuplot_plane(plot), notcurses_stdplane(nc)); ncplane_move_top(ncuplot_plane(plot)); } return demo_render(nc);