Exemple #1
0
 def __init__(self):
     url = "https://imgur.com/zzVFsU0.png"
     fun = "https://i.imgur.com/cQogon6.jpg"
     ce = Cena(fun).vai()
     can1 = Elemento(url, tit="BUTUCA", x=0, y=50, w=300, h=200, cena=ce)
     can1.siz = (300, 600)
     can1 = Elemento(url, tit="CORISCO", x=350, y=50, w=300, h=200, cena=ce)
     can1.siz = (300, 600)
     can1.pos = (0, -200)
     can1 = Elemento(url, tit="RETALHO", x=700, y=50, w=300, h=200, cena=ce)
     can1.siz = (300, 600)
     can1.pos = (0, -400)
Exemple #2
0
 def make_piece(index):
     pc = Elemento(PECAS, x=0, y=0, w=60, h=60, cena=self.cena)
     pc.siz = (180, 180)
     dx, dy = 60 * (index // 3), 60 * (index % 3)
     pc.pos = (-dx, -dy)
     INV.bota(pc)
     return pc