I want to emulate the behavior of 'hide_windows', but keep parts of a screen showing together with the background image.
So my screen is set up to override the middle button keymap, like so:
Code: Select all
screen night(event_pic = None, event_bg = None, changes = "", has_log = True): # event_pic can be an object or a string
tag show_screen
default show_ui = True
key "mouseup_2" action ToggleScreenVariable("show_ui")
However, my problem is that when a 'say' window is showing as well, the say window stays on when I click the middle button. This is not what I want.
So I tried:
Code: Select all
screen night(event_pic = None, event_bg = None, changes = "", has_log = True): # event_pic can be an object or a string
tag show_screen
default show_ui = True
key "mouseup_2" action (ToggleScreenVariable("show_ui"), ToggleScreen("say"))
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/BKendday.rpy", line 686, in script call
call show_night_event(ev)
File "game/BKevents.rpy", line 1003, in script
$ renpy.say(ev.char, text_descript)
File "game/BKevents.rpy", line 1003, in <module>
$ renpy.say(ev.char, text_descript)
Exception: Required parameter who has no value.
Apparently, while the 'say' window was hidden, the game forgot what it was supposed to say.
I then took various shots in the dark, all of which failed:
Code: Select all
renpy.curried_call_in_new_context("_hide_windows")
HideInterface()
Function(ui.interact, suppress_overlay=False, suppress_window=True)
renpy.curried_invoke_in_new_context(ui.interact, suppress_overlay=False, suppress_window=True)
Code: Select all
screen night(event_pic = None, event_bg = None, changes = "", has_log = True): # event_pic can be an object or a string
tag show_screen
default show_ui = True
if show_ui:
key "mouseup_2" action (ToggleScreenVariable("show_ui"), Hide("say")) #, ToggleScreen("say")), renpy.curried_call_in_new_context("_hide_windows"), HideInterface(), renpy.curried_invoke_in_new_context(ui.interact, suppress_overlay=False, suppress_window=True) all don't work
else:
key "mouseup_2" action (ToggleScreenVariable("show_ui"), Function(renpy.get_reshow_say))So I'm stuck. Does anyone know how I could achieve what I'm going for: hiding parts of a screen plus the say window and then showing both again at the click of a mouse button? Thank you!