draw everything from ezgui in screencap mode

This commit is contained in:
Dustin Carlino 2019-05-01 16:11:22 -07:00
parent 913ec8d4c7
commit 3b6ecbf4af
2 changed files with 12 additions and 12 deletions

View File

@ -345,7 +345,9 @@ impl DebugMode {
mode.objects.draw(g, &state.ui);
mode.neighborhood_summary.draw(g);
menu.draw(g);
if !g.is_screencap() {
menu.draw(g);
}
}
State::Polygons(ref debugger) => {
let mut opts = DrawOptions::new();

View File

@ -101,19 +101,17 @@ impl<G: GUI> State<G> {
}
let naming_hint = g.naming_hint.take();
if !screenshot {
// Always draw the menus last.
if let ContextMenu::Displaying(ref menu) = self.context_menu {
menu.draw(&mut g);
}
// Always draw text last
self.canvas
.glyphs
.borrow_mut()
.draw_queued(display, &mut target);
// Always draw the menus last.
if let ContextMenu::Displaying(ref menu) = self.context_menu {
menu.draw(&mut g);
}
// Always draw text last
self.canvas
.glyphs
.borrow_mut()
.draw_queued(display, &mut target);
target.finish().unwrap();
naming_hint
}