The Inventory Code
Code: Select all
grid 15 6:
xpos -791
ypos -445
spacing 2
for giftItem in giftList:
frame:
xmaximum 120
ymaximum 120
imagebutton idle giftItem.img hover giftItem.hove action None
for i in range(len(giftList), 90):
frame:
xmaximum 120
ymaximum 120
imagebutton idle "ErrorGift.png" action None
Code: Select all
class giftItem(object):
def __init__(self, name, img, hove, desc, amount, got):
self.name = name
self.img = img
self.hove = hove
self.desc = desc
self.amount = amount
self.got = got
Code: Select all
$ giftList.append(("Strawberry Milk", "strawmilk.png", "ErrorGift.png", "Pink colored milk.", 0, 0))
What do I need to change with the code to make it where it can find the attributes?