Optimize choice screen constants and variables

(cherry picked from commit c77f2ca46e)
This commit is contained in:
Gouvernathor 2023-11-18 19:47:40 +01:00 committed by LoafyLemon
parent 606c9c55e0
commit 9d8444241b

View File

@ -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)