140 lines
5.0 KiB
Plaintext
140 lines
5.0 KiB
Plaintext
# Defines
|
|
define wardrobe.outfit_schedule = ("day", "night", "cloudy", "rainy", "snowy")
|
|
define wardrobe.subcategories = {
|
|
"hair": 5, "shirts": 5, "skirts": 5, "pantyhose": 5, "slot1": 5, "panties": 5, "save": 5,
|
|
"earrings": 4, "sweaters": 4, "trousers": 4, "stockings": 4, "bikini panties": 4, "load": 4,
|
|
"neckwear": 3, "dresses": 3, "shorts": 3, "socks": 3, "schedule": 3,
|
|
"one-piece suits": 2, "import": 2,
|
|
"robes": 1, "export": 1,
|
|
"gloves": 0, "pubes": 0, "delete": 0,
|
|
"other": -1,
|
|
}
|
|
|
|
# Settings
|
|
default wardrobe.music = False
|
|
default wardrobe.chitchats = True
|
|
default wardrobe.autosave = False
|
|
default wardrobe.suppress_warnings = False
|
|
default wardrobe.randomize_color = False
|
|
default wardrobe.global_color = False
|
|
|
|
# Functions
|
|
init python in wardrobe:
|
|
from collections import OrderedDict
|
|
|
|
def get_subcategories(d):
|
|
return OrderedDict(
|
|
sorted(
|
|
[
|
|
(subcat, [item for item in items if item.unlocked])
|
|
for subcat, items in subcategories.get(d, {}).items()
|
|
],
|
|
key=lambda x: subcategories.get(x[0], 0),
|
|
reverse=True
|
|
)
|
|
)
|
|
|
|
def get_icon(category):
|
|
fp = f"gui/creamy_pumpkin_pie/icons/{category}.png"
|
|
if renpy.loadable(fp):
|
|
return renpy.store.Image(fp, oversample=4)
|
|
return renpy.store.Image("gui/creamy_pumpkin_pie/icons/noicon.png", oversample=4)
|
|
|
|
label wardrobe(inter_pause=True):
|
|
$ disable_game_menu()
|
|
if inter_pause:
|
|
# Ensures all irrelevant screens are hidden before capturing the surface tree
|
|
with Pause(0.2)
|
|
call screen wardrobe
|
|
$ enable_game_menu()
|
|
jump main_room_menu
|
|
|
|
screen wardrobe():
|
|
modal True
|
|
layer "interface"
|
|
zorder 0
|
|
style_prefix "wardrobe"
|
|
|
|
default navigation_atl = navigation_show
|
|
default last_frame = (screenshot.capture() or screenshot.image)
|
|
default navigation_last_frame_atl = navigation_last_frame_show
|
|
default navigation_exit = False
|
|
|
|
default character = get_character_object(states.active_girl)
|
|
default selected_category = None
|
|
default selected_subcategory = None
|
|
# default menu_items = inventory.get_instances_of_type(category)
|
|
# default selected_item = None
|
|
|
|
add last_frame at navigation_last_frame_atl
|
|
|
|
add "gui_fade_both" at gui_fade
|
|
|
|
if navigation_exit:
|
|
timer 0.4 action Return()
|
|
|
|
frame:
|
|
at navigation_atl
|
|
|
|
vbox:
|
|
hbox:
|
|
spacing 0
|
|
for category in character.wardrobe:
|
|
if category == "hidden":
|
|
continue
|
|
|
|
button:
|
|
add wardrobe.get_icon(category) xysize (64, 64)
|
|
tooltip "[category]"
|
|
action [SetScreenVariable("selected_category", category), SetScreenVariable("selected_subcategory", None)]
|
|
|
|
null height 5
|
|
add "frame_spacer" xsize 500 xalign 0.5
|
|
null height 5
|
|
|
|
if selected_category:
|
|
hbox:
|
|
for subcategory in character.wardrobe[selected_category]:
|
|
button:
|
|
add wardrobe.get_icon(subcategory) xysize (64, 64)
|
|
tooltip "[subcategory]"
|
|
action SetScreenVariable("selected_subcategory", subcategory)
|
|
|
|
null height 5
|
|
add "frame_spacer" xsize 500 xalign 0.5
|
|
null height 5
|
|
|
|
if selected_subcategory:
|
|
vpgrid:
|
|
cols 5
|
|
ysize 399
|
|
xspacing 5
|
|
yspacing 5
|
|
mousewheel True
|
|
scrollbars "vertical"
|
|
for item in character.wardrobe[selected_category][selected_subcategory]:
|
|
add item.button
|
|
add character.image align (1.0, 1.0) zoom 0.6
|
|
textbutton "Return" action [SetScreenVariable("navigation_last_frame_atl", navigation_last_frame_hide), SetScreenVariable("navigation_atl", navigation_hide), SetScreenVariable("navigation_exit", True)] keysym "game_menu" align (1.0, 0)
|
|
|
|
style wardrobe_item_button is empty:
|
|
background Transform("wheelmenu_button", xysize=(96,96))
|
|
hover_background At(Transform("wheelmenu_button_opaque", xysize=(96,96)), wheelmenu_hover_anim)
|
|
selected_foreground Transform("#ffffff", alpha=0.5)
|
|
hover_sound "sounds/qubodup-hover1.ogg"
|
|
activate_sound "sounds/qubodup-click2.ogg"
|
|
# anchor (0.5, 0.5)
|
|
|
|
style wardrobe_item_button_inadequate is empty:
|
|
background Transform("wheelmenu_button", xysize=(64,64))
|
|
hover_background At(Transform("wheelmenu_button_opaque", xysize=(64,64), matrixcolor=TintMatrix("#ff0000")), wheelmenu_hover_anim)
|
|
hover_sound "sounds/qubodup-hover1.ogg"
|
|
activate_sound "sounds/qubodup-click2.ogg"
|
|
# anchor (0.5, 0.5)
|
|
|
|
style wardrobe_frame is empty:
|
|
xsize 540
|
|
yfill True
|
|
padding (10, 10)
|
|
background Frame(Image("gui/creamy_pumpkin_pie/side_frame.png", oversample=4), 0, 100, 9, 75, tile=False)
|