Skip to content

Commit

Permalink
close console window after loading game
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDavenport committed Sep 17, 2022
1 parent 1b349f2 commit ade9798
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gamercade_console/src/gui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ impl Gui {
session: &mut Option<P2PSession<WasmConsole>>,
ctx: &Context,
) {
let mut is_open = self.window_open;
egui::Window::new("Main Menu")
.open(&mut self.window_open)
.open(&mut is_open)
.collapsible(false)
.show(ctx, |ui| {
ui.group(|ui| {
Expand Down Expand Up @@ -212,6 +213,8 @@ impl Gui {

*session = Some(new_session);

self.window_open = false;

self.wasm_console = Some(WasmConsole::new(
rom,
seed,
Expand Down

0 comments on commit ade9798

Please sign in to comment.