From 2a55ca692c6a140594bf427b1191ce9970b0cf3f Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Mon, 11 Nov 2024 19:06:18 +0000 Subject: [PATCH] Clothing store 2.0 - Prototype --- .../creamy_pumpkin_pie/store/price_tag.png | 3 + game/scripts/shops/dress/chitchats.rpy | 2 +- game/scripts/shops/dress/menu.rpy | 596 +++++++++++------- game/sounds/woosh2.ogg | 3 + 4 files changed, 362 insertions(+), 242 deletions(-) create mode 100644 game/gui/creamy_pumpkin_pie/store/price_tag.png create mode 100644 game/sounds/woosh2.ogg diff --git a/game/gui/creamy_pumpkin_pie/store/price_tag.png b/game/gui/creamy_pumpkin_pie/store/price_tag.png new file mode 100644 index 00000000..962ef236 --- /dev/null +++ b/game/gui/creamy_pumpkin_pie/store/price_tag.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d922525bd36ff18d676b2617c540da85b195b8a813ad3193ff832c14680d99ce +size 13123 diff --git a/game/scripts/shops/dress/chitchats.rpy b/game/scripts/shops/dress/chitchats.rpy index f44078a0..cc812e0d 100644 --- a/game/scripts/shops/dress/chitchats.rpy +++ b/game/scripts/shops/dress/chitchats.rpy @@ -1,4 +1,4 @@ -label purchase_outfit(item): +label discuss_outfit(item): # # Hermione Granger # diff --git a/game/scripts/shops/dress/menu.rpy b/game/scripts/shops/dress/menu.rpy index 19ffed24..95c28a90 100644 --- a/game/scripts/shops/dress/menu.rpy +++ b/game/scripts/shops/dress/menu.rpy @@ -1,288 +1,288 @@ -init python: - def shop_dress_sortfilter(item, sortby="Price (Asc)", filtering=None): - # Always sort alphabetically first. - item = sorted(item, key=lambda x: natsort_key(x.name)) +# init python: +# def shop_dress_sortfilter(item, sortby="Price (Asc)", filtering=None): +# # Always sort alphabetically first. +# item = sorted(item, key=lambda x: natsort_key(x.name)) - if sortby == "Price (Asc)": - item.sort(key=lambda x: x.price, reverse=False) - elif current_sorting == "Price (Desc)": - item.sort(key=lambda x: x.price, reverse=True) - if sortby == "Lewdness (Asc)": - item.sort(key=get_outfit_score, reverse=False) - elif current_sorting == "Lewdness (Desc)": - item.sort(key=get_outfit_score, reverse=True) - return item +# if sortby == "Price (Asc)": +# item.sort(key=lambda x: x.price, reverse=False) +# elif current_sorting == "Price (Desc)": +# item.sort(key=lambda x: x.price, reverse=True) +# if sortby == "Lewdness (Asc)": +# item.sort(key=get_outfit_score, reverse=False) +# elif current_sorting == "Lewdness (Desc)": +# item.sort(key=get_outfit_score, reverse=True) +# return item -label shop_dress: - $ gui.in_context("shop_dress_menu") - return +# label shop_dress: +# $ gui.in_context("shop_dress_menu") +# return -label shop_dress_menu: +# label shop_dress_menu: - python: - current_sorting = "Price (Asc)" - category_items = {"hermione": hermione.outfits, "tonks": tonks.outfits, "cho": cho.outfits, "luna": luna.outfits, "astoria": astoria.outfits, "susan": susan.outfits} - current_category = "hermione" - store_cart = set() - menu_items = shop_dress_sortfilter((x for x in category_items.get(current_category, []) if (x.unlocked == False and x.price > 0 and x not in store_cart)), current_sorting) - current_item = next(iter(menu_items), None) - parcel_callbacks = [] +# python: +# current_sorting = "Price (Asc)" +# category_items = {"hermione": hermione.outfits, "tonks": tonks.outfits, "cho": cho.outfits, "luna": luna.outfits, "astoria": astoria.outfits, "susan": susan.outfits} +# current_category = "hermione" +# store_cart = set() +# menu_items = shop_dress_sortfilter((x for x in category_items.get(current_category, []) if (x.unlocked == False and x.price > 0 and x not in store_cart)), current_sorting) +# current_item = next(iter(menu_items), None) +# parcel_callbacks = [] - show screen shop_dress() +# show screen shop_dress() - label .after_init: +# label .after_init: - $ renpy.dynamic(__choice = ui.interact()) +# $ renpy.dynamic(__choice = ui.interact()) - if __choice[0] == "category": - $ current_category = __choice[1] - $ menu_items = shop_dress_sortfilter((x for x in category_items.get(current_category, []) if (x.unlocked == False and x.price > 0 and x not in store_cart)), current_sorting) - $ current_item = next(iter(menu_items), None) - elif __choice[0] == "buy": - show screen blktone - with d3 - if states.env.gold < __choice[1].price: - gen "(I don't have enough gold.)" ("base", xpos="far_left", ypos="head") - else: - if len(store_cart) < 5: - $ renpy.call("purchase_outfit", __choice[1]) +# if __choice[0] == "category": +# $ current_category = __choice[1] +# $ menu_items = shop_dress_sortfilter((x for x in category_items.get(current_category, []) if (x.unlocked == False and x.price > 0 and x not in store_cart)), current_sorting) +# $ current_item = next(iter(menu_items), None) +# elif __choice[0] == "buy": +# show screen blktone +# with d3 +# if states.env.gold < __choice[1].price: +# gen "(I don't have enough gold.)" ("base", xpos="far_left", ypos="head") +# else: +# if len(store_cart) < 5: +# $ renpy.call("purchase_outfit", __choice[1]) - play sound "sounds/money.ogg" - $ states.env.gold -= __choice[1].price - $ store_cart.add(__choice[1]) - $ menu_items = shop_dress_sortfilter((x for x in category_items.get(current_category, []) if (x.unlocked == False and x.price > 0 and x not in store_cart)), current_sorting) - $ current_item = next(iter(menu_items), None) +# play sound "sounds/money.ogg" +# $ states.env.gold -= __choice[1].price +# $ store_cart.add(__choice[1]) +# $ menu_items = shop_dress_sortfilter((x for x in category_items.get(current_category, []) if (x.unlocked == False and x.price > 0 and x not in store_cart)), current_sorting) +# $ current_item = next(iter(menu_items), None) - if len(store_cart) < 5: - maf "Anything else?" - else: - maf "That was your fifth order, sir, I'm afraid it will have to be your last one." - else: - maf "I'm sorry luv but that's as much as you can order for now." - hide screen blktone - with d3 +# if len(store_cart) < 5: +# maf "Anything else?" +# else: +# maf "That was your fifth order, sir, I'm afraid it will have to be your last one." +# else: +# maf "I'm sorry luv but that's as much as you can order for now." +# hide screen blktone +# with d3 - elif __choice == "sort": - if current_sorting == "Price (Asc)": - $ current_sorting = "Price (Desc)" - elif current_sorting == "Price (Desc)": - $ current_sorting = "Lewdness (Asc)" - elif current_sorting == "Lewdness (Asc)": - $ current_sorting = "Lewdness (Desc)" - elif current_sorting == "Lewdness (Desc)": - $ current_sorting = "Price (Asc)" +# elif __choice == "sort": +# if current_sorting == "Price (Asc)": +# $ current_sorting = "Price (Desc)" +# elif current_sorting == "Price (Desc)": +# $ current_sorting = "Lewdness (Asc)" +# elif current_sorting == "Lewdness (Asc)": +# $ current_sorting = "Lewdness (Desc)" +# elif current_sorting == "Lewdness (Desc)": +# $ current_sorting = "Price (Asc)" - $ menu_items = shop_dress_sortfilter([x for x in category_items.get(current_category, []) if bool(x.unlocked == False and x.price > 0 and not x in store_cart)], current_sorting) - else: # Close - if len(store_cart) < 5: - show screen blktone - with d3 - menu: - maf "Are you finished shopping, dearie?" +# $ menu_items = shop_dress_sortfilter([x for x in category_items.get(current_category, []) if bool(x.unlocked == False and x.price > 0 and not x in store_cart)], current_sorting) +# else: # Close +# if len(store_cart) < 5: +# show screen blktone +# with d3 +# menu: +# maf "Are you finished shopping, dearie?" - "-Yes, I'm done-": - pass - "-Not yet-": - hide screen blktone - with d3 - jump .after_init +# "-Yes, I'm done-": +# pass +# "-Not yet-": +# hide screen blktone +# with d3 +# jump .after_init - if store_cart: - $ transit_time = len(store_cart)+1 - $ packaging_fee = 45 + ( (len(store_cart)-1) * 20 ) +# if store_cart: +# $ transit_time = len(store_cart)+1 +# $ packaging_fee = 45 + ( (len(store_cart)-1) * 20 ) - menu: - maf "If you pay extra, I could hire a bunch of elves to speed things up..." - "\"Fine. ([packaging_fee] gold)\"" if states.env.gold >= packaging_fee: - $ states.env.gold -= packaging_fee - $ transit_time = int(transit_time/2) - "\"Fine. ([packaging_fee] gold)\"" (style="disabled") if states.env.gold < packaging_fee: - maf "Sorry luv, but it appears you have no gold left." - "-No thanks-": - pass +# menu: +# maf "If you pay extra, I could hire a bunch of elves to speed things up..." +# "\"Fine. ([packaging_fee] gold)\"" if states.env.gold >= packaging_fee: +# $ states.env.gold -= packaging_fee +# $ transit_time = int(transit_time/2) +# "\"Fine. ([packaging_fee] gold)\"" (style="disabled") if states.env.gold < packaging_fee: +# maf "Sorry luv, but it appears you have no gold left." +# "-No thanks-": +# pass - hide screen shop_dress - hide screen blktone +# hide screen shop_dress +# hide screen blktone - $ _tmp = "tomorrow" if transit_time == 1 else f"in about {transit_time} days" - maf "You can expect a parcel [_tmp]." +# $ _tmp = "tomorrow" if transit_time == 1 else f"in about {transit_time} days" +# maf "You can expect a parcel [_tmp]." - # Executes callbacks upon receival of the parcel. - $ curry = renpy.curry(execute_callbacks)(parcel_callbacks) if parcel_callbacks else None - $ parcel_callbacks = [] - $ Parcel(contents=[(k, 1) for k in store_cart], wait=transit_time, func=curry).send() +# # Executes callbacks upon receival of the parcel. +# $ curry = renpy.curry(execute_callbacks)(parcel_callbacks) if parcel_callbacks else None +# $ parcel_callbacks = [] +# $ Parcel(contents=[(k, 1) for k in store_cart], wait=transit_time, func=curry).send() - return - else: - gen "Nothing has caught my eye I'm afraid." ("base", xpos="far_left", ypos="head") - maf "Maybe next time." - return +# return +# else: +# gen "Nothing has caught my eye I'm afraid." ("base", xpos="far_left", ypos="head") +# maf "Maybe next time." +# return - jump .after_init +# jump .after_init -screen shop_dress(): - tag shop_dress - zorder 15 - modal True +# screen shop_dress(): +# tag shop_dress +# zorder 15 +# modal True - add "gui_fade" +# add "gui_fade" - if renpy.mobile: - use close_button_background - use close_button +# if renpy.mobile: +# use close_button_background +# use close_button - fixed: - if settings.get("animations"): - at gui_animation +# fixed: +# if settings.get("animations"): +# at gui_animation - use shop_dress_menu() - use shop_dress_menuitem() +# use shop_dress_menu() +# use shop_dress_menuitem() -screen shop_dress_menu(): - tag shop_menu - zorder 15 - style_prefix "shop" +# screen shop_dress_menu(): +# tag shop_menu +# zorder 15 +# style_prefix "shop" - default icon_bg = gui.format("interface/achievements/{}/iconbox.webp") - default icon_frame = Frame(gui.format("interface/frames/{}/iconframe.webp"), 6, 6) - default panel = gui.format("interface/frames/{}/panel_left.webp") - default highlight = gui.format("interface/achievements/{}/highlight_left_b.webp") +# default icon_bg = gui.format("interface/achievements/{}/iconbox.webp") +# default icon_frame = Frame(gui.format("interface/frames/{}/iconframe.webp"), 6, 6) +# default panel = gui.format("interface/frames/{}/panel_left.webp") +# default highlight = gui.format("interface/achievements/{}/highlight_left_b.webp") - window: - pos (150, 90) - xysize (207, 454) - background panel +# window: +# pos (150, 90) +# xysize (207, 454) +# background panel - use invisible_button() +# use invisible_button() - vbox: - pos (6, 6) - for category in category_items.keys(): - if get_character_unlock(category): - $ icon = Fixed(icon_bg, Frame( Transform(f"interface/icons/head/{category}.webp", fit="contain"), xysize=(42, 42), offset=(3, 3)), "interface/achievements/glass_iconbox.webp") +# vbox: +# pos (6, 6) +# for category in category_items.keys(): +# if get_character_unlock(category): +# $ icon = Fixed(icon_bg, Frame( Transform(f"interface/icons/head/{category}.webp", fit="contain"), xysize=(42, 42), offset=(3, 3)), "interface/achievements/glass_iconbox.webp") - vbox: - textbutton category: - style "empty" - xysize (195, 48) - text_align (0.6, 0.5) - text_xanchor 0.5 - text_size 20 +# vbox: +# textbutton category: +# style "empty" +# xysize (195, 48) +# text_align (0.6, 0.5) +# text_xanchor 0.5 +# text_size 20 - foreground icon - hover_background highlight - selected_background highlight - selected (current_category == category) - action Return(["category", category]) +# foreground icon +# hover_background highlight +# selected_background highlight +# selected (current_category == category) +# action Return(["category", category]) - add gui.format("interface/frames/{}/spacer_left.webp") +# add gui.format("interface/frames/{}/spacer_left.webp") - vbox: - style_prefix gui.theme('achievements_filters') +# vbox: +# style_prefix gui.theme('achievements_filters') - pos (6, 384) - button action None - textbutton "Sort by: [current_sorting]" action Return("sort") +# pos (6, 384) +# button action None +# textbutton "Sort by: [current_sorting]" action Return("sort") -screen shop_dress_menuitem(): +# screen shop_dress_menuitem(): - tag shop_menuitem - zorder 16 - style_prefix "shop" +# tag shop_menuitem +# zorder 16 +# style_prefix "shop" - default icon_size = (144, 288) - default icon_frame = Frame(gui.format("interface/frames/{}/iconframe.webp"), 6, 6) - default panel = gui.format("interface/frames/{}/panel.webp") +# default icon_size = (144, 288) +# default icon_frame = Frame(gui.format("interface/frames/{}/iconframe.webp"), 6, 6) +# default panel = gui.format("interface/frames/{}/panel.webp") - window: - pos (367, 37) - xysize (560, 501) - background panel +# window: +# pos (367, 37) +# xysize (560, 501) +# background panel - use invisible_button() +# use invisible_button() - text "Shop" size 22 xalign 0.5 ypos 65 +# text "Shop" size 22 xalign 0.5 ypos 65 - if current_item: +# if current_item: - frame: - xalign 0.5 - ypos 412 +# frame: +# xalign 0.5 +# ypos 412 - vbox: - xalign 0.5 - add gui.format("interface/achievements/{}/highlight.webp")# pos (112, 375) - add gui.format("interface/achievements/{}/spacer.webp")# pos (120, 398) - text "[current_item.desc]" size 12 yoffset 6 +# vbox: +# xalign 0.5 +# add gui.format("interface/achievements/{}/highlight.webp")# pos (112, 375) +# add gui.format("interface/achievements/{}/spacer.webp")# pos (120, 398) +# text "[current_item.desc]" size 12 yoffset 6 - text "[current_item.name]" xalign 0.5 ypos 3 size 16 +# text "[current_item.name]" xalign 0.5 ypos 3 size 16 - $ frame = Frame(gui.format("interface/frames/{}/iconframe.webp"), 6, 6) +# $ frame = Frame(gui.format("interface/frames/{}/iconframe.webp"), 6, 6) - textbutton "Buy": - style "inventory_button" - background frame - xalign 0.95 - action Return(["buy", current_item]) +# textbutton "Buy": +# style "inventory_button" +# background frame +# xalign 0.95 +# action Return(["buy", current_item]) - vpgrid: - rows 1 - xspacing 5 - yspacing 2 - draggable True - mousewheel "horizontal" - scrollbars "horizontal" - xmaximum 512 - ypos 106 - xalign 0.5 +# vpgrid: +# rows 1 +# xspacing 5 +# yspacing 2 +# draggable True +# mousewheel "horizontal" +# scrollbars "horizontal" +# xmaximum 512 +# ypos 106 +# xalign 0.5 - at transform: - mesh True +# at transform: +# mesh True - for item in menu_items: - $ icon = Transform(item.image, crop=(215, 0, 680, 1200), mesh=True, gl_pixel_perfect=True) - $ is_modded = item.is_modded() - $ is_affordable = bool(states.env.gold >= item.price) +# for item in menu_items: +# $ icon = Transform(item.image, crop=(215, 0, 680, 1200), mesh=True, gl_pixel_perfect=True) +# $ is_modded = item.is_modded() +# $ is_affordable = bool(states.env.gold >= item.price) - button: - style "shop_outfit_button" - xysize icon_size - background Transform(icon, xsize=144, ysize=288, fit="contain", anchor=(0.5, 1.0), align=(0.5, 1.0), yoffset=-6) - selected (current_item == item) - action SetVariable("current_item", item) +# button: +# style "shop_outfit_button" +# xysize icon_size +# background Transform(icon, xsize=144, ysize=288, fit="contain", anchor=(0.5, 1.0), align=(0.5, 1.0), yoffset=-6) +# selected (current_item == item) +# action SetVariable("current_item", item) - add icon_frame +# add icon_frame - if is_affordable: - text "{color=#daa520}G{/color} [item.price]" xalign 0.5 ypos 10 color "#ffffff" outlines [ (1, "#000", 0, 0) ] style "shop_outfit_text" - else: - text "{color=#daa520}G{/color} {color=#ff0000}[item.price]{/color}" xalign 0.5 ypos 10 color "#ffffff" outlines [ (1, "#000", 0, 0) ] style "shop_outfit_text" +# if is_affordable: +# text "{color=#daa520}G{/color} [item.price]" xalign 0.5 ypos 10 color "#ffffff" outlines [ (1, "#000", 0, 0) ] style "shop_outfit_text" +# else: +# text "{color=#daa520}G{/color} {color=#ff0000}[item.price]{/color}" xalign 0.5 ypos 10 color "#ffffff" outlines [ (1, "#000", 0, 0) ] style "shop_outfit_text" - if config.developer: - $ outfit_score = get_outfit_score(item) - text "{color=#fff}score{/color} [outfit_score]" align (0.1, 0.98) color "#ffffff" outlines [ (1, "#000", 0, 0) ] size 8 +# if config.developer: +# $ outfit_score = get_outfit_score(item) +# text "{color=#fff}score{/color} [outfit_score]" align (0.1, 0.98) color "#ffffff" outlines [ (1, "#000", 0, 0) ] size 8 - hbox: - offset (5, -5) - align (0.0, 1.0) +# hbox: +# offset (5, -5) +# align (0.0, 1.0) - if is_modded: - text "M" color "#00b200" +# if is_modded: +# text "M" color "#00b200" -style shop_window is empty +# style shop_window is empty -style shop_outfit_button is empty: - foreground None - hover_foreground "#ffffff80" - selected_foreground "#ffffff40" - activate_sound "sounds/click.ogg" +# style shop_outfit_button is empty: +# foreground None +# hover_foreground "#ffffff80" +# selected_foreground "#ffffff40" +# activate_sound "sounds/click.ogg" -style shop_outfit_button_text is default: - size 14 +# style shop_outfit_button_text is default: +# size 14 -style shop_outfit_text: - size 20 +# style shop_outfit_text: +# size 20 # Functions (Initialised after wardrobe) init 5 python in clothing_store: @@ -295,9 +295,9 @@ init 5 python in clothing_store: def change_section(section): scope = renpy.get_screen("clothing_store_interface").scope + scope["character"] = renpy.store.get_character_object(section) scope["selected_section"] = section - scope["selected_item"] = None - scope["character"] = get_character_object(section) + scope["selected_item"] = next(outfits(section), None) def add_remove_outfit(outfit): scope = renpy.get_screen("clothing_store_interface").scope @@ -313,7 +313,7 @@ init 5 python in clothing_store: renpy.notify("You can only have five items in your cart.") renpy.sound.play("sounds/fail.ogg") - def select(outfit): + def select_outfit(outfit): scope = renpy.get_screen("clothing_store_interface").scope scope["selected_item"] = outfit @@ -333,6 +333,45 @@ init 5 python in clothing_store: # Reset states renpy.restart_interaction() + def outfits(section): + scope = renpy.get_screen("clothing_store_interface").scope + character = scope["character"] + + # Sort the outfits by price in ascending order + sorted_outfits = sorted((x for x in reversed(character.outfits) if not x.unlocked and x.price > 0), key=lambda outfit: outfit.price) + + return iter(sorted_outfits) + + def discuss(outfit): + renpy.store._skipping = True + renpy.suspend_rollback(False) + renpy.block_rollback() + renpy.call_in_new_context("discuss_outfit", outfit) + renpy.store._skipping = False + + def wheelmenu(outfit): + scope = renpy.get_screen("clothing_store_interface").scope + character = scope["character"] + cart = scope["cart"] + + exit_action = renpy.store.Function(renpy.hide_screen, "wheelmenu") + select_action = renpy.store.Function(select_outfit, outfit) + add_remove_action = renpy.store.Function(add_remove_outfit, outfit) + + d = { + _("select"): (renpy.store.Text("✅", align=(0.5, 0.5)), [exit_action, select_action]) + } + + if outfit in cart: + d[_("Remove from cart")] = (renpy.store.Text("🛒", align=(0.5, 0.5)), [exit_action, add_remove_action]) + else: + d[_("Add to cart")] = (renpy.store.Text("🛒", align=(0.5, 0.5)), [exit_action, add_remove_action]) + + btns = renpy.store.create_wheelmenu(d) + + renpy.play("sounds/qubodup-click1.ogg") + renpy.show_screen("wheelmenu", btns, pos=None, close_action=exit_action) + # Context label clothing_store_interface(inter_pause=True): $ disable_game_menu() @@ -350,7 +389,7 @@ label clothing_store_interface(inter_pause=True): screen clothing_store_interface(): layer "interface" zorder 0 - style_prefix "wardrobe" + style_prefix "store" default navigation_atl = wardrobe_show default character_atl = wardrobe_character_show @@ -360,9 +399,12 @@ screen clothing_store_interface(): default character = get_character_object("tonks") default selected_section = "tonks" - default selected_item = None + default selected_item = next(clothing_store.outfits(selected_section), None) default cart = set() + $ total_price = sum([item.price for item in cart]) + $ total_gold = states.env.gold-total_price + add last_frame at navigation_last_frame_atl add "gui_fade_both" at gui_fade @@ -380,15 +422,32 @@ screen clothing_store_interface(): vbox: style_prefix "navigation_tabs" - pos (540, 470) + pos (540, 428) at navigation_tabs_show - textbutton (_("Remove from cart") if selected_item in cart else _("Add to cart")) action Function(clothing_store.add_remove_outfit, selected_item) sensitive selected_item at navigation_tabs - textbutton _("Checkout") action clothing_store.buy at navigation_tabs + textbutton _("Discuss") action Function(clothing_store.discuss, selected_item) style "navigation_tabs_button_special" at navigation_tabs + textbutton (_("Remove from cart") if selected_item in cart else _("Add to cart")) action Function(clothing_store.add_remove_outfit, selected_item) selected (selected_item in cart) style "store_tabs_button_add_remove" at navigation_tabs + textbutton _("Checkout") action clothing_store.buy sensitive (states.env.gold >= total_price and cart) at navigation_tabs null height 35 textbutton _("Exit") action clothing_store.exit keysym "K_ESCAPE" at navigation_tabs + if selected_item: + vbox: + at character_atl + pos (972, 468) + vbox: + xoffset -36 + text _("[states.env.gold]G") xalign 1.0 + text _("-[total_price]G") xalign 1.0 + add "frame_spacer" xsize 100 + if total_gold >= 0: + text _("[total_gold]G") xalign 1.0 + else: + text _("[total_gold]G") color "#ad0000" xalign 1.0 + + label _("G") + str(selected_item.price) xoffset -50 + frame: at navigation_atl @@ -397,10 +456,12 @@ screen clothing_store_interface(): hbox: spacing 0 - button: - add clothing_store.get_icon("tonks") xysize (64, 64) - tooltip _("tonks") - action Function(clothing_store.change_section, "tonks") selected (selected_section == "tonks") + for i in states.dolls: + + button: + add clothing_store.get_icon(i) xysize (64, 64) + tooltip i + action Function(clothing_store.change_section, i) selected (selected_section == i) null height 3 add "frame_spacer" xsize 500 xalign 0.5 @@ -413,19 +474,72 @@ screen clothing_store_interface(): mousewheel True scrollbars "vertical" - for outfit in (x for x in reversed(character.outfits) if (not x.unlocked and x.price > 0)): + for outfit in clothing_store.outfits(selected_section): button: - style "store_item_rectangular_button" + style "store_rectangular_button" add outfit.button.child + label "G[outfit.price]" style "store_label_small" if outfit in cart: add Transform(Text("🛒"), align=(1.0, 1.0), size=(24, 24)) - action Function(clothing_store.select, outfit) + + if renpy.android: + action Function(clothing_store.wheelmenu, outfit) + else: + action Function(clothing_store.select_outfit, outfit) + alternate Function(clothing_store.wheelmenu, outfit) selected (selected_item == outfit) -style store_item_rectangular_button is wardrobe_item_button: +style store_rectangular_button is wardrobe_item_button: + xysize (96, 168) background Transform("wheelmenu_frame_vertical", xysize=(96,168)) hover_background At(Transform("wheelmenu_frame_opaque_vertical", xysize=(96,168)), wheelmenu_hover_anim) selected_background Fixed(Transform("wheelmenu_frame_vertical", xysize=(96,168)), At(Transform("interface/achievements/glow.webp", align=(0.5, 0.5), size=(96, 96), alpha=0.5), rotate_circular)) selected_hover_background Fixed(At(Transform("wheelmenu_frame_vertical", xysize=(96,168)), wheelmenu_hover_anim), At(Transform("interface/achievements/glow.webp", align=(0.5, 0.5), size=(96, 96), alpha=0.5), rotate_circular)) - selected_foreground None \ No newline at end of file + selected_foreground None + +style store_frame is wardrobe_frame +style store_button is wardrobe_button + +style store_text is wardrobe_text: + color "#FFFFFF" + +style store_label: + background Image("gui/creamy_pumpkin_pie/store/price_tag.png", oversample=3) + +style store_label_text: + anchor (1.0, 0.5) + text_align 1.0 + pos (110, 30) + color "#000000" + outlines [(2, "#8BA5D9", 1, 1)] + hinting "bytecode" + size 24 + +style store_label_small: + align (0.0, 1.0) + xysize (68, 28) + background Frame(Image("gui/creamy_pumpkin_pie/store/price_tag.png", oversample=6), 20, 10, tile=False, fit="contain") + +style store_label_small_text: + anchor (1.0, 0.5) + text_align 1.0 + pos (50, 16) + color "#000000" + outlines [(1, "#8BA5D9", 1, 1)] + hinting "bytecode" + size 14 + +style store_tabs_button_add_remove is navigation_tabs_button: + ysize 35 + left_padding 15 + right_padding 30 + selected_right_padding 30 + background Frame(Transform(Image("gui/creamy_pumpkin_pie/book/book_tab.png", oversample=4), matrixcolor=HueMatrix(180.0)), 0, 0, 80, 0, tile=False) + selected_background Frame(Transform(Image("gui/creamy_pumpkin_pie/book/book_tab.png", oversample=4), matrixcolor=HueMatrix(275.0)), 0, 0, 80, 0, tile=False) + insensitive_background Frame(Transform(Image("gui/creamy_pumpkin_pie/book/book_tab.png", oversample=4), matrixcolor=SaturationMatrix(0.0)), 0, 0, 80, 0, tile=False) + activate_sound "sounds/woosh2.ogg" + selected_activate_sound "sounds/woosh.ogg" + +style store_tabs_button_add_remove_text is navigation_tabs_button_text: + selected_xoffset 0 diff --git a/game/sounds/woosh2.ogg b/game/sounds/woosh2.ogg new file mode 100644 index 00000000..a256762d --- /dev/null +++ b/game/sounds/woosh2.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5c09ceff2d6990eeb9b706ed2fc29561c656acdc7a50be9b46acc131da4c70d +size 14047