chore(gui): ensure all windows are disabled by default

This commit is contained in:
Rekai Nyangadzayi Musuka 2021-06-02 23:06:20 -05:00
parent 86f3a897f1
commit 50ba300d23
1 changed files with 45 additions and 37 deletions

View File

@ -24,6 +24,8 @@ pub struct Egui {
show_flags: bool, show_flags: bool,
show_cpu_info: bool, show_cpu_info: bool,
show_registers: bool, show_registers: bool,
show_int: bool,
show_timer: bool,
#[cfg(feature = "debug")] #[cfg(feature = "debug")]
show_disasm: bool, show_disasm: bool,
@ -60,6 +62,8 @@ impl Egui {
show_flags: false, show_flags: false,
show_cpu_info: false, show_cpu_info: false,
show_registers: false, show_registers: false,
show_int: false,
show_timer: false,
#[cfg(feature = "debug")] #[cfg(feature = "debug")]
show_disasm: false, show_disasm: false,
#[cfg(feature = "debug")] #[cfg(feature = "debug")]
@ -143,7 +147,9 @@ impl Egui {
}); });
}); });
egui::Window::new("Timer").show(ctx, |ui| { egui::Window::new("Timer")
.open(&mut self.show_timer)
.show(ctx, |ui| {
let timer = game_boy.bus.timer(); let timer = game_boy.bus.timer();
ui.horizontal(|ui| { ui.horizontal(|ui| {
@ -285,7 +291,9 @@ impl Egui {
self.show_disasm = show_disasm; self.show_disasm = show_disasm;
} }
egui::Window::new("IRQ Information").show(ctx, |ui| { egui::Window::new("IRQ Information")
.open(&mut self.show_int)
.show(ctx, |ui| {
let req = game_boy.read_byte(0xFF0F); let req = game_boy.read_byte(0xFF0F);
let enabled = game_boy.read_byte(0xFFFF); let enabled = game_boy.read_byte(0xFFFF);