Avoid code duplication and using throwaway variables
This commit is contained in:
parent
f17cffa3ec
commit
66f8f5ab28
@ -638,22 +638,16 @@ screen wardrobe_menu(xx, yy):
|
|||||||
yspacing 18
|
yspacing 18
|
||||||
|
|
||||||
for i, category in enumerate(wardrobe_categories):
|
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:
|
button:
|
||||||
focus_mask None
|
focus_mask None
|
||||||
xysize (72, 72)
|
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"
|
activate_sound "sounds/scroll.ogg"
|
||||||
tooltip category
|
tooltip category
|
||||||
sensitive (not bool(DollThread._count))
|
sensitive (not bool(DollThread._count))
|
||||||
action Return(["category", category])
|
action Return(["category", category])
|
||||||
if current_category == category:
|
if current_category == category:
|
||||||
xoffset icon_xoffset
|
xoffset -18 if (i % 2) == 0 else 18
|
||||||
|
|
||||||
# Outfits and Studio
|
# Outfits and Studio
|
||||||
hbox:
|
hbox:
|
||||||
|
Loading…
Reference in New Issue
Block a user