From a4e953ecf35fbc2c0a1c4b76cc95e702d48cbe48 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Fri, 27 May 2022 16:23:37 +0100 Subject: [PATCH] Bug fix * Forbid editor from applying changes when hidden * Allow skip interaction when editor is hidden --- game/scripts/interface/hotkeys.rpy | 4 ++-- game/scripts/utility/editor.rpy | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/game/scripts/interface/hotkeys.rpy b/game/scripts/interface/hotkeys.rpy index 7387865f..f7f5c0d1 100644 --- a/game/scripts/interface/hotkeys.rpy +++ b/game/scripts/interface/hotkeys.rpy @@ -1,5 +1,5 @@ -init -100 python: +init 1 python: # Custom hotkeys config.keymap = dict( @@ -153,7 +153,7 @@ init -100 python: #director = director.Start(), performance = ToggleScreen("_performance"), accessibility = ShowMenu("preferences", page="accessibility"), - editor = ToggleScreen("editor"), + editor = [ToggleField(e, "active", True, False), ToggleScreen("editor")], ) config.underlay = [ _default_keymap ] diff --git a/game/scripts/utility/editor.rpy b/game/scripts/utility/editor.rpy index 3be885f4..38120c68 100644 --- a/game/scripts/utility/editor.rpy +++ b/game/scripts/utility/editor.rpy @@ -13,8 +13,12 @@ init python: self.active_expressions = _dict() self.persistent_expressions = _dict() self.last_expressions = _dict() + self.active = False def catch(self, *args, **kwargs): + if not self.active: + return + global n # DEBUG self.node = None self.live_code = None