Wardrobe 2.0 - Android+PC navigation split, Bug fix, Add remove colour for colour picker favs, small performance bump for colour picker icons
This commit is contained in:
parent
8cfff1febe
commit
a267ebabba
BIN
game/images/interface/wheelmenu/wheelmenu_frame_opaque.png
(Stored with Git LFS)
Normal file
BIN
game/images/interface/wheelmenu/wheelmenu_frame_opaque.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
game/images/interface/wheelmenu/wheelmenu_frame_opaque_vertical.png
(Stored with Git LFS)
Normal file
BIN
game/images/interface/wheelmenu/wheelmenu_frame_opaque_vertical.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
game/images/interface/wheelmenu/wheelmenu_frame_vertical.png
(Stored with Git LFS)
Normal file
BIN
game/images/interface/wheelmenu/wheelmenu_frame_vertical.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -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
|
||||
|
@ -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."""
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user