diff options
| author | Freya Murphy <freya@freyacat.org> | 2025-11-30 15:11:29 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2025-11-30 15:11:29 -0500 |
| commit | cf1e13a328f962a760757f31f86ce5bc248c72a3 (patch) | |
| tree | 3f0ae469423ad7cd1fbc1b9efef672d7b7d39137 /graphics/src/lib.rs | |
| parent | audio: make sounds! woah (diff) | |
| download | DungeonCrawl-cf1e13a328f962a760757f31f86ce5bc248c72a3.tar.gz DungeonCrawl-cf1e13a328f962a760757f31f86ce5bc248c72a3.tar.bz2 DungeonCrawl-cf1e13a328f962a760757f31f86ce5bc248c72a3.zip | |
game: add more debug keys
Diffstat (limited to '')
| -rw-r--r-- | graphics/src/lib.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/graphics/src/lib.rs b/graphics/src/lib.rs index fa83b98..fdab836 100644 --- a/graphics/src/lib.rs +++ b/graphics/src/lib.rs @@ -43,6 +43,9 @@ pub enum Key { // Debug keys F3, F4, + F5, + F6, + F11, // Unknown/Unused key Unknown(KeyboardKey), } @@ -79,6 +82,9 @@ impl From<KeyboardKey> for Key { // Debug keys K::KEY_F3 => Self::F3, K::KEY_F4 => Self::F4, + K::KEY_F5 => Self::F5, + K::KEY_F6 => Self::F6, + K::KEY_F11 => Self::F11, // Unknown/Unused key _ => Self::Unknown(key), } @@ -117,6 +123,9 @@ impl From<Key> for KeyboardKey { // Debug keys Key::F3 => Self::KEY_F3, Key::F4 => Self::KEY_F4, + Key::F5 => Self::KEY_F5, + Key::F6 => Self::KEY_F6, + Key::F11 => Self::KEY_F11, // Unknown/Unused key Key::Unknown(k) => k, } @@ -275,4 +284,9 @@ impl Window { pub const fn audio(&mut self) -> &mut Audio { &mut self.audio } + + /// Toggles fullscreen + pub fn toggle_fullscreen(&mut self) { + self.handle.toggle_fullscreen(); + } } |