Skip to content

Commit

Permalink
prism transparent
Browse files Browse the repository at this point in the history
  • Loading branch information
rutra8002 committed Feb 13, 2024
1 parent 765e711 commit 1d330fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion classes/gameobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ def render(self):
if self.texture:
pygame.gfxdraw.textured_polygon(self.game.screen, self.points, self.texture, int(self.x), int(self.y))
else:
pygame.gfxdraw.filled_polygon(self.game.screen, self.points, self.color)
if self.color:
pygame.gfxdraw.filled_polygon(self.game.screen, self.points, self.color)
else:
pygame.gfxdraw.polygon(self.game.screen, self.points, (255, 255, 255))

else:
font = pygame.font.Font(Font, self.game.width//40)
Expand Down
2 changes: 1 addition & 1 deletion gui/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def checkifclicked(self, mousepos):
obj = gameobjects.ColoredGlass(self.game, [(mousepos[0] - 10, mousepos[1] - 50), (mousepos[0] + 10, mousepos[1] - 50), (mousepos[0] + 10, mousepos[1] + 50), (mousepos[0] - 10, mousepos[1] + 50)], (0, 255, 0), 0, 0.4, 1)

elif self.number == 3:
obj = gameobjects.Prism(self.game, [(mousepos[0] - 50, mousepos[1]), (mousepos[0], mousepos[1] - 100), (mousepos[0] + 50, mousepos[1])], (0, 0, 255), 0, 0.4, 0.5)
obj = gameobjects.Prism(self.game, [(mousepos[0] - 50, mousepos[1]), (mousepos[0], mousepos[1] - 100), (mousepos[0] + 50, mousepos[1])], None, 0, 0.4, 0.5)

elif self.number == 4:
if classes.game.isDrawingModeOn == True:
Expand Down

0 comments on commit 1d330fe

Please sign in to comment.