embedded-menu
embedded-menu copied to clipboard
simulator requires to re-create the display in main loop?
in all examples we find
// setup code
'running: loop {
let mut display = SimulatorDisplay::new(Size::new(128, 64));
menu.update(&display);
menu.draw(&mut display).unwrap();
window.update(&display);
// event handling logic
}
Ok(())
I tried creating the display only once, it results in afterimages of everything that was once on screen. Why do we have to re-create the simulated display, shouldn't menu.update turn of the pixel that aren't used anymore ?
Looking at the examples from embedded-graphics-simulator, it appears that they don't do that.