Fix F3 debug overlay toggling in the main menu
This commit is contained in:
@@ -9558,7 +9558,6 @@ impl ApplicationHandler for Game<'_> {
|
||||
event: key_event, ..
|
||||
} = &event
|
||||
&& let PhysicalKey::Code(key) = key_event.physical_key
|
||||
&& self.title.is_none()
|
||||
{
|
||||
use horizon_client::debug_keys::KeyAction;
|
||||
let action = match (key_event.state, key_event.repeat) {
|
||||
|
||||
@@ -51,6 +51,9 @@ impl DebugHost for Host<'_, '_> {
|
||||
|
||||
impl Game<'_> {
|
||||
fn open_screen(&self) -> OpenScreen {
|
||||
if self.title.is_some() {
|
||||
return OpenScreen::Other;
|
||||
}
|
||||
match self.screen {
|
||||
Screen::GameModeSwitcher => OpenScreen::GameModeSwitcher,
|
||||
Screen::Playing if self.book.is_none() && self.sign_edit.is_none() => OpenScreen::None,
|
||||
|
||||
Reference in New Issue
Block a user