From 9d8444241b78ae2cda1d7cf13e49b748c6a3a860 Mon Sep 17 00:00:00 2001 From: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com> Date: Sat, 18 Nov 2023 19:47:40 +0100 Subject: [PATCH] Optimize choice screen constants and variables (cherry picked from commit c77f2ca46e405a95f5fab6af75bfd4ae348f0a3d) --- game/scripts/gui/say.rpy | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/game/scripts/gui/say.rpy b/game/scripts/gui/say.rpy index 5029a34f..71c7a96b 100644 --- a/game/scripts/gui/say.rpy +++ b/game/scripts/gui/say.rpy @@ -153,6 +153,9 @@ style quick_alt_button_text: # # https://www.renpy.org/doc/html/screen_special.html#choice +define blacklist_screens = {"say", "letter", "bld1"} +define choice_width = int(config.screen_width/2) + screen choice(items, menu_yalign=.6): tag menu modal True @@ -160,7 +163,6 @@ screen choice(items, menu_yalign=.6): style_prefix gui.theme("menu") - default blacklist_screens = {"say", "letter", "bld1"} # Combine sets default blacklist_tags = set(get_character_tag(x) for x in states.dolls) # Dont add the fade if character or saybox is present (They have their own triggers for fading) @@ -174,9 +176,8 @@ screen choice(items, menu_yalign=.6): vbox: spacing 0 - $ choice_width = int(config.screen_width/2) - $ max_progress = max([len(e.kwargs.get("progress", [])) for e in items]) + default max_progress = max(len(e.kwargs.get("progress", [])) for e in items) for i, entry in enumerate(items, 1): $ style_part = entry.kwargs.get("style", None)