From 95fb316a2396ef765c69043513c2a81932f6b5c3 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 9 Oct 2023 20:38:03 -0700 Subject: [PATCH] add fullscreen hotkey --- src/main.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main.rs b/src/main.rs index 45511b77..6cff11ae 100644 --- a/src/main.rs +++ b/src/main.rs @@ -951,6 +951,16 @@ impl framework::Example for GlobalState { 57=>Some(InputInstruction::Jump(s)),//Space 44=>Some(InputInstruction::Zoom(s)),//Z 19=>if s{Some(InputInstruction::Reset)}else{None},//R + 87=>{//F11 + if s{ + if window.fullscreen().is_some(){ + window.set_fullscreen(None); + }else{ + window.set_fullscreen(Some(winit::window::Fullscreen::Borderless(None))); + } + } + None + }, 01=>{//Esc if s{ self.manual_mouse_lock=false;