klappt ned :(
This commit is contained in:
parent
27af4863df
commit
1fff6840fb
1 changed files with 8 additions and 5 deletions
13
main.py
13
main.py
|
@ -64,18 +64,21 @@ class DVD():
|
||||||
scaledy = self.size[1]*self.scale
|
scaledy = self.size[1]*self.scale
|
||||||
self.scalesize = (scaledx,scaledy)
|
self.scalesize = (scaledx,scaledy)
|
||||||
self.rendered_dvd = pygame.surface.Surface(self.scalesize, flags=pygame.SRCALPHA)
|
self.rendered_dvd = pygame.surface.Surface(self.scalesize, flags=pygame.SRCALPHA)
|
||||||
|
|
||||||
self.rendered_dvd.fill(self.color)
|
|
||||||
self.rendered_dvd = pygame.transform.scale(self.dvd,self.scalesize)#(self.scalesize[0],self.scalesize[1]+10))
|
self.rendered_dvd = pygame.transform.scale(self.dvd,self.scalesize)#(self.scalesize[0],self.scalesize[1]+10))
|
||||||
|
|
||||||
#pygame.transform.threshold(self.advd, self.advd, (0, 0, 0), (0, 0, 0,128), self.color, inverse_set=False)
|
self.rendered_dvd2 = pygame.surface.Surface(self.scalesize, flags=pygame.SRCALPHA)
|
||||||
|
self.rendered_dvd2.fill(self.color)
|
||||||
|
|
||||||
|
pygame.transform.threshold(self.rendered_dvd, self.rendered_dvd2, (0, 0, 0), (255, 0, 0, 128), self.color, inverse_set=False)
|
||||||
|
|
||||||
|
#screen.blit(self.rendered_dvd2,self.pos)
|
||||||
screen.blit(self.rendered_dvd,self.pos)
|
screen.blit(self.rendered_dvd,self.pos)
|
||||||
|
|
||||||
def render(self):
|
def render(self):
|
||||||
self.get_dvd()
|
self.get_dvd()
|
||||||
|
|
||||||
pygame.draw.rect(screen,self.color,(self.pos[0],self.pos[1],self.scalesize[0],self.scalesize[1]))
|
#pygame.draw.rect(screen,self.color,(self.pos[0],self.pos[1],self.scalesize[0],self.scalesize[1]))
|
||||||
screen.blit(self.rendered_dvd,self.pos)
|
#screen.blit(self.rendered_dvd,self.pos)
|
||||||
|
|
||||||
dvds = []
|
dvds = []
|
||||||
dvds.append(DVD(1,1))#ri(1,10)))
|
dvds.append(DVD(1,1))#ri(1,10)))
|
||||||
|
|
Loading…
Reference in a new issue