Avoid code duplication and using throwaway variables
(cherry picked from commit 66f8f5ab28
)
This commit is contained in:
parent
36582d0f9c
commit
faba726a3d
@ -638,22 +638,16 @@ screen wardrobe_menu(xx, yy):
|
||||
yspacing 18
|
||||
|
||||
for i, category in enumerate(wardrobe_categories):
|
||||
if wardrobe_check_category(category):
|
||||
$ icon = Fixed(icon_bg, Transform("interface/wardrobe/icons/categories/{}/{}.webp".format(states.active_girl, category), zoom=0.45, anchor=(0.5, 0.5), align=(0.5, 0.5)), icon_frame)
|
||||
else:
|
||||
$ icon = Fixed(icon_bg, Transform("interface/wardrobe/icons/categories/{}/{}.webp".format(states.active_girl, category), zoom=0.45, anchor=(0.5, 0.5), align=(0.5, 0.5), matrixcolor=SaturationMatrix(0.0)), icon_frame)
|
||||
$ icon_xoffset = -18 if (i % 2) == 0 else 18
|
||||
|
||||
button:
|
||||
focus_mask None
|
||||
xysize (72, 72)
|
||||
background lock_wardrobe_icon(icon)
|
||||
background lock_wardrobe_icon(Fixed(icon_bg, Transform(f"interface/wardrobe/icons/categories/{states.active_girl}/{category}.webp", zoom=0.45, anchor=(0.5, 0.5), align=(0.5, 0.5), matrixcolor=(IdentityMatrix() if wardrobe_check_category(category) else SaturationMatrix(0.0))), icon_frame))
|
||||
activate_sound "sounds/scroll.ogg"
|
||||
tooltip category
|
||||
sensitive (not bool(DollThread._count))
|
||||
action Return(["category", category])
|
||||
if current_category == category:
|
||||
xoffset icon_xoffset
|
||||
xoffset -18 if (i % 2) == 0 else 18
|
||||
|
||||
# Outfits and Studio
|
||||
hbox:
|
||||
|
Loading…
Reference in New Issue
Block a user