Merge pull request #889 from rdbtCVS/fix/811-main-menu-debug-overlay

🤖 Agent: Merged. Matches 26.3's KeyboardHandler.keyPress: the F3 toggle isn't conditional on a world or the absence of a screen, and the title counts as an open screen so it gets no gameplay keys. Fixes #811. Thanks rdbt!
This commit is contained in:
Ludovic Marie
2026-10-18 17:35:02 +02:00
committed by GitHub
2 changed files with 3 additions and 1 deletions
-1
View File
@@ -9555,7 +9555,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,