Skip to content

Commit

Permalink
more fullscreen buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Nertsal committed May 30, 2024
1 parent d6bfd5b commit eb2d06f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/menu/level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,9 @@ impl geng::State for LevelMenu {

fn handle_event(&mut self, event: geng::Event) {
match event {
geng::Event::KeyPress {
key: geng::Key::F11,
} => self.context.geng.window().toggle_fullscreen(),
geng::Event::EditText(text) => {
self.ui_context.text_edit.text = text;
}
Expand Down
3 changes: 3 additions & 0 deletions src/menu/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ impl geng::State for MainMenu {

fn handle_event(&mut self, event: geng::Event) {
match event {
geng::Event::KeyPress {
key: geng::Key::F11,
} => self.context.geng.window().toggle_fullscreen(),
geng::Event::CursorMove { position } => {
self.cursor_pos = position;
}
Expand Down

0 comments on commit eb2d06f

Please sign in to comment.