diff --git a/game/images/interface/wheelmenu/wheelmenu_frame_opaque.png b/game/images/interface/wheelmenu/wheelmenu_frame_opaque.png new file mode 100644 index 00000000..af4ec181 --- /dev/null +++ b/game/images/interface/wheelmenu/wheelmenu_frame_opaque.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d00d026476b5b844cd883ea46bffb89fb787266f810b01e0c0d1caa49136ba4 +size 57465 diff --git a/game/images/interface/wheelmenu/wheelmenu_frame_opaque_vertical.png b/game/images/interface/wheelmenu/wheelmenu_frame_opaque_vertical.png new file mode 100644 index 00000000..bd62441a --- /dev/null +++ b/game/images/interface/wheelmenu/wheelmenu_frame_opaque_vertical.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:811b295cd34e22608482fa903b70f8e96f2b8a400295d56c7e1cbafd85dddda9 +size 57192 diff --git a/game/images/interface/wheelmenu/wheelmenu_frame_vertical.png b/game/images/interface/wheelmenu/wheelmenu_frame_vertical.png new file mode 100644 index 00000000..667d6b71 --- /dev/null +++ b/game/images/interface/wheelmenu/wheelmenu_frame_vertical.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49565271c8e6d3c43b6b2e3e2dd3ed118dce53f4c4998b5284cc7073dd7f0847 +size 78906 diff --git a/game/scripts/doll/clothes.rpy b/game/scripts/doll/clothes.rpy index 42b88b17..4a3dd2ab 100644 --- a/game/scripts/doll/clothes.rpy +++ b/game/scripts/doll/clothes.rpy @@ -234,9 +234,14 @@ init python: hbox = [] overlay = [] - action = [Function(wardrobe.wheelmenu, self), self.build_button] - unhovered = None - alternate = None + if renpy.android: + action = [Function(wardrobe.wheelmenu, self), self.build_button] + unhovered = None + alternate = None + else: + action = [Function(wardrobe.equip, self), self.build_button] + unhovered = None + alternate = [Function(wardrobe.wheelmenu, self), self.build_button] if is_inadequate: warnings.append("Character level too low") @@ -271,11 +276,6 @@ init python: if is_inadequate: style = "wardrobe_item_button_inadequate" - if is_equipped: - alternate = Function(wardrobe.jump_to_item, self, "color_picker") - else: - alternate = [Function(wardrobe.equip, self), Function(wardrobe.jump_to_item, self, "color_picker")] - return Button(child=child, focus_mask=None, xysize=(96, 96), action=action, tooltip=("\n".join(warnings)), unhovered=unhovered, style=style, selected=is_equipped, alternate=alternate) @functools.cache diff --git a/game/scripts/doll/clothes_dynamic.rpy b/game/scripts/doll/clothes_dynamic.rpy index 5fa38c32..4ea65589 100644 --- a/game/scripts/doll/clothes_dynamic.rpy +++ b/game/scripts/doll/clothes_dynamic.rpy @@ -165,7 +165,7 @@ init python: tracking_object = self.tracking_object if (d := self.get_disk_cache(hash)): - return d + return AlphaMask(Transform(d, xysize=(96, 96)), Transform("wheelmenu_button_opaque", xysize=(96, 96))) matrix = SaturationMatrix(0.0) sprites = [i for i in self.build_image(hash, matrix=matrix) if not i[0] == "mask"] @@ -201,7 +201,7 @@ init python: y = hmax-h d = Transform(Fixed(*[i[1] for i in sprites], fit_first=True), crop=(x, y, w, h), size=(256, 256), fit="contain", align=(0.5, 0.5)) - return self.create_disk_cache(d, hash) + return AlphaMask(Transform(self.create_disk_cache(d, hash), xysize=(96, 96)), Transform("wheelmenu_button_opaque", xysize=(96, 96))) def clone(self): """Creates a clone of this cloth object. Since it requires a parent object it should be used internally only to avoid object depth issue.""" diff --git a/game/scripts/doll/outfits.rpy b/game/scripts/doll/outfits.rpy index cdba035c..f87e0831 100644 --- a/game/scripts/doll/outfits.rpy +++ b/game/scripts/doll/outfits.rpy @@ -93,7 +93,7 @@ init python: def build_icon(self, hash): sprite = self.build_image(self._hash) sprite = Transform(sprite, crop=(220, 0, 680, 1200), size=(96, 168), fit="contain", align=(0.5, 1.0), yoffset=-6) - return AlphaMask(Transform(sprite, xysize=(96, 168)), Transform("wheelmenu_button_opaque", xysize=(96, 168))) + return AlphaMask(Transform(sprite, xysize=(96, 168)), Transform("wheelmenu_frame_opaque_vertical", xysize=(96, 168))) @property def icon(self): @@ -116,20 +116,25 @@ init python: warnings.append("Outfit contains items from these mods:\n{size=-4}{color=#35aae2}"+ "\n".join(self.get_modname()) + "{/color}{/size}") hbox.append(Text("M", color="#00b200", style="wardrobe_button_text")) - action = [Function(wardrobe.wheelmenu, self, "outfits"), self.build_button] - alternate = None - unhovered = None + if renpy.android: + action = [Function(wardrobe.wheelmenu, self, "outfits"), self.build_button] + unhovered = None + alternate = None + else: + action = [Function(wardrobe.equip, self), self.build_button] + unhovered = None + alternate = [Function(wardrobe.wheelmenu, self, "outfits"), self.build_button] if has_schedule: for i in wardrobe.outfit_schedule: # NONLOCAL if self.schedule[i]: - vbox.append(Transform(f"interface/wardrobe/icons/outfits/{i}.webp", size=(16, 16), offset=(6, 6))) + vbox.append(Transform(f"interface/wardrobe/icons/outfits/{i}.webp", size=(16, 16), offset=(3, 6))) # if is_equipped: # hbox.append(Transform("interface/topbar/icon_check.webp", align=(1.0, 1.0), offset=(-6, -6), size=(24, 24))) if vbox: - hbox.append(VBox(*vbox)) + hbox.append(VBox(*vbox, ypos=34)) if hbox: child = Fixed(child, HBox(*hbox), fit_first=True) diff --git a/game/scripts/wardrobe/color_picker.rpy b/game/scripts/wardrobe/color_picker.rpy index 55c547a3..a1ca0549 100644 --- a/game/scripts/wardrobe/color_picker.rpy +++ b/game/scripts/wardrobe/color_picker.rpy @@ -497,6 +497,10 @@ init python in colorpicker: def add_favorite(index, col): renpy.store.colorpicker.favorites[index] = col + @staticmethod + def remove_favorite(index): + ColorPicker.add_favorite(index, None) + def set_layer(item, layer): # Update scope scope = renpy.get_screen("wardrobe").scope diff --git a/game/scripts/wardrobe/wardrobe.rpy b/game/scripts/wardrobe/wardrobe.rpy index 2803928c..93c1c45a 100644 --- a/game/scripts/wardrobe/wardrobe.rpy +++ b/game/scripts/wardrobe/wardrobe.rpy @@ -245,15 +245,15 @@ init python in wardrobe: if isinstance(item, renpy.store.DollCloth): hide_action = renpy.store.Function(toggle_item, item.type) - def _overwrite_outfit(character, item): - selected_outfit_index = character.outfits.index(item) - selected_outfit_schedule = character.outfits[selected_outfit_index].schedule.copy() + # def _overwrite_outfit(character, item): + # selected_outfit_index = character.outfits.index(item) + # selected_outfit_schedule = character.outfits[selected_outfit_index].schedule.copy() - current_outfit = character.create_outfit() - current_outfit.delete() # Removes from list only - current_outfit.schedule = selected_outfit_schedule + # current_outfit = character.create_outfit() + # current_outfit.delete() # Removes from list only + # current_outfit.schedule = selected_outfit_schedule - character.outfits[selected_outfit_index] = current_outfit + # character.outfits[selected_outfit_index] = current_outfit def schedule_action(): btns = renpy.store.create_wheelmenu({ @@ -274,10 +274,10 @@ init python in wardrobe: if section == "outfits": delete_action = item.delete export_action = renpy.store.Function(item.export_data, f"{item._hash}.png") - overwrite_action = renpy.store.Function(_overwrite_outfit, character, item) + # overwrite_action = renpy.store.Function(_overwrite_outfit, character, item) d[_("Equip")] = (renpy.store.Text("👗", align=(0.5, 0.5)), [exit_action, equip_action]) - d[_("Overwrite")] = (renpy.store.Text("💾", align=(0.5, 0.5)), [exit_action, overwrite_action]) + # d[_("Overwrite")] = (renpy.store.Text("💾", align=(0.5, 0.5)), [exit_action, overwrite_action]) d[_("Delete")] = (renpy.store.Text("❌", align=(0.5, 0.5)), [exit_action, delete_action]) d[_("Export")] = (renpy.store.Text("📤", align=(0.5, 0.5)), [exit_action, export_action]) d[_("Schedule")] = (renpy.store.Text("🗓️", align=(0.5, 0.5)), [exit_action, schedule_action]) @@ -303,13 +303,33 @@ init python in wardrobe: renpy.play("sounds/qubodup-click1.ogg") renpy.show_screen("wheelmenu", btns, pos=None, close_action=exit_action) + def wheelmenu_swatch(i, col): + exit_action = renpy.store.Function(renpy.hide_screen, "wheelmenu") + select_action = renpy.store.Function(renpy.store.colorpicker.set_color, value=col) if col else renpy.store.NullAction() + delete_action = renpy.store.Function(renpy.store.colorpicker.cp.remove_favorite, i) if col else renpy.store.NullAction() + save_action = renpy.store.Function(renpy.store.colorpicker.cp.add_favorite, i, renpy.store.colorpicker.cp.live_color) + d = { + _("Select"): (renpy.store.Text("✅", align=(0.5, 0.5)), [exit_action, select_action]), + _("Delete"): (renpy.store.Text("❌", align=(0.5, 0.5)), [exit_action, delete_action]), + } + + if col: + d[_("Overwrite")] = (renpy.store.Text("💾", align=(0.5, 0.5)), [exit_action, save_action]) + else: + d[_("Save")] = (renpy.store.Text("💾", align=(0.5, 0.5)), [exit_action, save_action]) + + + btns = renpy.store.create_wheelmenu(d) + renpy.play("sounds/qubodup-click1.ogg") + renpy.show_screen("wheelmenu", btns, pos=None, close_action=exit_action) + def color_picker_item_icon(item): scope = renpy.get_screen("wardrobe").scope character = scope["character"] if character.is_worn(item.type): - return renpy.store.AlphaMask(renpy.store.Transform(item.icon, xysize=(48, 48)), renpy.store.Transform("wheelmenu_button_opaque", xysize=(48, 48))) - return renpy.store.Transform(renpy.store.AlphaMask(renpy.store.Transform(item.icon, xysize=(48, 48)), renpy.store.Transform("wheelmenu_button_opaque", xysize=(48, 48))), matrixcolor=renpy.store.SaturationMatrix(0)*renpy.store.BrightnessMatrix(-0.25)*renpy.store.OpacityMatrix(0.5)) + return renpy.store.Transform(item.icon, xysize=(48, 48)) + return renpy.store.Transform(item.icon, matrixcolor=renpy.store.SaturationMatrix(0)*renpy.store.BrightnessMatrix(-0.25)*renpy.store.OpacityMatrix(0.5)) @functools.cache def easteregg(character_name): @@ -449,12 +469,14 @@ screen wardrobe(): mousewheel True scrollbars "vertical" - textbutton "Save": + textbutton _("Empty Slut{#Intentional misspelling.}"): focus_mask None xysize (96, 168) - insensitive_background "#0000001A" - idle_background "#00000033" + insensitive_background AlphaMask("#0000001A", Transform("wheelmenu_frame_opaque_vertical", xysize=(96, 168))) + idle_background AlphaMask("#00000033", Transform("wheelmenu_frame_opaque_vertical", xysize=(96, 168))) + hover_background At(AlphaMask("#00000033", Transform("wheelmenu_frame_opaque_vertical", xysize=(96, 168))), wheelmenu_hover_anim) text_align (0.5, 0.5) + text_text_align 0.5 # Lol. Lmao even. (Centers text horizontally when split across lines) sensitive (not bool(DollThread._count)) action wardrobe.save @@ -520,8 +542,12 @@ screen wardrobe(): if item and item.color: button: add wardrobe.color_picker_item_icon(item) - action Function(wardrobe.wheelmenu, item, "color_picker") selected (selected_item == item) - alternate Function(wardrobe.jump_to_item, item) + if renpy.android: + action Function(wardrobe.wheelmenu, item, "color_picker") + else: + action Function(wardrobe.change_item, item) + alternate Function(wardrobe.wheelmenu, item, "color_picker") + selected (selected_item == item) style "wardrobe_item_small_button" if selected_item: $ is_blacklisted = selected_item.type.startswith(tuple(selected_item.blacklist_unequip)) @@ -622,8 +648,11 @@ screen wardrobe(): xysize (32, 32) style "wardrobe_swatch" background (Transform(Image("gui/creamy_pumpkin_pie/colorpicker/colorpicker_swatch.png", oversample=4), xysize=(32, 32), matrixcolor=SepiaMatrix(col, desat=(0.3333, 0.3333, 0.3333))) if col else Transform(Image("gui/creamy_pumpkin_pie/colorpicker/colorpicker_swatch_empty.png", oversample=4), xysize=(32, 32))) - action (Function(colorpicker.set_color, value=col) if col else NullAction()) - alternate Function(colorpicker.cp.add_favorite, i, colorpicker.cp.live_color) + if renpy.android: + action Function(wardrobe.wheelmenu_swatch, i, col) + else: + action (Function(colorpicker.set_color, value=col) if col else NullAction()) + alternate Function(wardrobe.wheelmenu_swatch, i, col) selected (col == colorpicker.cp.live_color) label _("Layer Adjustments") xalign 0.5 @@ -671,8 +700,8 @@ style wardrobe_item_small_button is wardrobe_item_button: selected_foreground Transform("interface/topbar/icon_check.webp", align=(1.0, 1.0), size=(24, 24)) style wardrobe_item_rectangular_button is wardrobe_item_button: - background Transform("wheelmenu_button", xysize=(96,168)) - hover_background At(Transform("wheelmenu_button_opaque", xysize=(96,168)), wheelmenu_hover_anim) + background Transform("wheelmenu_frame_vertical", xysize=(96,168)) + hover_background At(Transform("wheelmenu_frame_opaque_vertical", xysize=(96,168)), wheelmenu_hover_anim) selected_foreground Transform("interface/topbar/icon_check.webp", align=(1.0, 1.0), size=(24, 24)) style wardrobe_outline: