Bugfix
* Fixed editor active flag becoming stuck after rolling back to before it was called * Put editor onto interface layer to exclude it from transitions
This commit is contained in:
parent
1cee1f2930
commit
8542fabbb4
@ -153,7 +153,7 @@ init 1 python:
|
|||||||
#director = director.Start(),
|
#director = director.Start(),
|
||||||
performance = ToggleScreen("_performance"),
|
performance = ToggleScreen("_performance"),
|
||||||
accessibility = ShowMenu("preferences", page="accessibility"),
|
accessibility = ShowMenu("preferences", page="accessibility"),
|
||||||
editor = [ToggleField(e, "active", True, False), ToggleScreen("editor")],
|
editor = ToggleEditor(),
|
||||||
)
|
)
|
||||||
|
|
||||||
config.underlay = [ _default_keymap ]
|
config.underlay = [ _default_keymap ]
|
||||||
|
@ -410,6 +410,21 @@ init python:
|
|||||||
|
|
||||||
return self.read_history(file, line)
|
return self.read_history(file, line)
|
||||||
|
|
||||||
|
@renpy.pure
|
||||||
|
class ToggleEditor(Action, NoRollback):
|
||||||
|
def __call__(self):
|
||||||
|
if not config.developer:
|
||||||
|
return
|
||||||
|
|
||||||
|
if renpy.get_screen("editor", layer="interface"):
|
||||||
|
e.active = False
|
||||||
|
renpy.hide_screen("editor", layer="interface")
|
||||||
|
else:
|
||||||
|
e.active = True
|
||||||
|
renpy.show_screen("editor")
|
||||||
|
|
||||||
|
renpy.restart_interaction()
|
||||||
|
|
||||||
if config.developer:
|
if config.developer:
|
||||||
e = Editor()
|
e = Editor()
|
||||||
|
|
||||||
@ -421,6 +436,7 @@ init python:
|
|||||||
screen editor():
|
screen editor():
|
||||||
zorder 50
|
zorder 50
|
||||||
style_prefix "editor"
|
style_prefix "editor"
|
||||||
|
layer "interface"
|
||||||
|
|
||||||
text "Active" pos (25, 25)
|
text "Active" pos (25, 25)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user