We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47ddc36 commit 6865c2aCopy full SHA for 6865c2a
src/main.rs
@@ -119,7 +119,7 @@ impl EventHandler for MyGame {
119
120
fn key_down_event(
121
&mut self,
122
- _ctx: &mut Context,
+ ctx: &mut Context,
123
keycode: KeyCode,
124
_keymod: KeyMods,
125
_repeat: bool,
@@ -136,6 +136,14 @@ impl EventHandler for MyGame {
136
let change = self.game_screen.lock().unwrap().key_press(keycode);
137
138
if let Some(s) = change {
139
+ match s {
140
+ Screen::Menu => {
141
+ self.game_screen = game::Game::create(ctx);
142
+ }
143
+
144
+ _ => (),
145
146
147
self.screen = s;
148
}
149
0 commit comments