Rebuild wardrobe (5) switch to the new call screen system
fix a mistake in 8d297a7
on the way
This commit is contained in:
parent
5252c7eae2
commit
82018cfdad
@ -230,7 +230,7 @@ init python:
|
||||
hbox = []
|
||||
overlay = []
|
||||
|
||||
action = [Return(["equip", self]), self.build_button]
|
||||
action = [Call("wardrobe_actions.equip", self, from_current=True), self.build_button]
|
||||
unhovered = None
|
||||
foreground = None
|
||||
hover_foreground = "#ffffff80"
|
||||
|
@ -130,25 +130,25 @@ init python:
|
||||
## One can manipulate the button actions using Button.action
|
||||
|
||||
if subcat == "delete":
|
||||
action = Return(["deloutfit", self])
|
||||
action = WardrobeDelOutfit(self)
|
||||
elif subcat == "load":
|
||||
action = Return(["equip", self])
|
||||
action = Call("wardrobe_actions.equip", self, from_current=True)
|
||||
elif subcat == "save":
|
||||
action = Return(["addoutfit", self])
|
||||
action = WardrobeAddOutfit(self)
|
||||
# elif subcat == "import": # Imports are taken care of outside the class.
|
||||
# action = Return(["import", self])
|
||||
# action = WardrobeImport(self)
|
||||
elif subcat == "export":
|
||||
action = Return(["export", self])
|
||||
action = WardrobeExport(self)
|
||||
elif subcat == "schedule":
|
||||
if not has_schedule and not is_inadequate:
|
||||
action = Return(["schedule", self])
|
||||
alternate = Return(["schedule", self])
|
||||
action = Call("wardrobe_actions.schedule", self, from_current=True)
|
||||
alternate = Call("wardrobe_actions.schedule", self, from_current=True)
|
||||
foreground = "#00000040"
|
||||
hover_foreground = "#80808040"
|
||||
selected_foreground = "#80808040"
|
||||
elif has_schedule:
|
||||
action = Return(["schedule", self])
|
||||
alternate = Return(["schedule", self])
|
||||
action = Call("wardrobe_actions.schedule", self, from_current=True)
|
||||
alternate = Call("wardrobe_actions.schedule", self, from_current=True)
|
||||
# elif is_inadequate:
|
||||
# foreground = "#b2000040"
|
||||
# hover_foreground = "#CD5C5C40"
|
||||
@ -286,4 +286,3 @@ init python:
|
||||
if self.has_type(arg):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
@ -178,7 +178,7 @@ init -1 python:
|
||||
def build_button(rp):
|
||||
style = "wardrobe_button"
|
||||
child = Fixed(Transform(rp, xsize=96, fit="contain", yalign=1.0, yoffset=-6), Frame(gui.format("interface/frames/{}/iconframe.webp"), 6, 6), xysize=(96, 168))
|
||||
action = Return(["import", rp])
|
||||
action = WardrobeImport(rp)
|
||||
hover_foreground = "#ffffff80"
|
||||
|
||||
return Button(child=child, action=action, hover_foreground=hover_foreground, style=style)
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user