Esempio n. 1
0
tup=["buttons.png","game",(0,30,117,25),(0,0,120,30),(250,200)]
menu.placeAt("button",tup)

tup = ["falloutBox.jpeg",(0,0,320,150),(50,10)]
menu.placeAt("background",tup)

menu.makeBasicScreen()

fruit = Item(200,100)
fruit.setImage("items.png",pygame.Rect(0,0,31,31))


button = Button()
button.setOffImage("buttons.png",(0,0,120,20))
button.setOnImage("buttons.png",(0,32,115,25))
button.setLoc(130,50)
button.setName("exit")

bar = Button()
bar.setOffImage("userBar.png",(0,0,349,17))
bar.setOnImage("userBar.png",(0,0,349,17)) # note: you may want to have 2 different bars. One clicked, one not clicked. 
bar.setLoc(0,0)
bar.setName("userBar")

inventory = BackPack(width = 230, height = 200)
inventory.addPreMadeButton(bar)
inventory.addPreMadeButton(button)
inventory.setLoc(203,292)
#inventory.setImage("city.png",(0,0),(20,20,100,100))#works! 
inventory.fill("purple.png")
#print "only here once"