From: Simon Cross Date: Sat, 5 Mar 2016 15:48:48 +0000 (+0200) Subject: Will it blend? X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=13843a74f6d1956d6fa172a825128a3a18ec6ca6;p=koperkapel.git Will it blend? --- diff --git a/koperkapel/scenes/roach_management.py b/koperkapel/scenes/roach_management.py index 4cc0395..6c867fb 100644 --- a/koperkapel/scenes/roach_management.py +++ b/koperkapel/scenes/roach_management.py @@ -1,5 +1,6 @@ """ Roach management scene. """ +from pygame.constants import BLEND_RGBA_MULT, BLEND_RGBA_SUB from pgzero.constants import keys, mouse from pgzero.actor import Actor from pgzero.screen import Screen @@ -69,7 +70,13 @@ class RoachesScene(Scene): base.blit(overlay, (0, 0)) frame = self._vehicle.roach_management_frame() if frame is not None: - base.blit(frame, (0, 0)) + frame = frame.copy() + frame.fill((255, 255, 255, 8), None, BLEND_RGBA_MULT) + frame_rect = frame.get_rect() + base.blit(frame, ( + VEHICLE_MID_X - frame_rect.w // 2, + VEHICLE_MID_Y - frame_rect.h // 2), + None, BLEND_RGBA_SUB) self.actors.default.add(SurfActor(base)) def _init_seats(self):