Optimize choice screen constants and variables
(cherry picked from commit c77f2ca46e
)
This commit is contained in:
parent
606c9c55e0
commit
9d8444241b
@ -153,6 +153,9 @@ style quick_alt_button_text:
|
|||||||
#
|
#
|
||||||
# https://www.renpy.org/doc/html/screen_special.html#choice
|
# 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):
|
screen choice(items, menu_yalign=.6):
|
||||||
tag menu
|
tag menu
|
||||||
modal True
|
modal True
|
||||||
@ -160,7 +163,6 @@ screen choice(items, menu_yalign=.6):
|
|||||||
|
|
||||||
style_prefix gui.theme("menu")
|
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)
|
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)
|
# 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:
|
vbox:
|
||||||
spacing 0
|
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):
|
for i, entry in enumerate(items, 1):
|
||||||
$ style_part = entry.kwargs.get("style", None)
|
$ style_part = entry.kwargs.get("style", None)
|
||||||
|
Loading…
Reference in New Issue
Block a user