[pypy-svn] r7270 - pypy/trunk/src/pypy/translator/tool/pygame

bob at codespeak.net bob at codespeak.net
Tue Nov 16 11:27:46 CET 2004


Author: bob
Date: Tue Nov 16 11:27:46 2004
New Revision: 7270

Modified:
   pypy/trunk/src/pypy/translator/tool/pygame/graphdisplay.py
Log:
translucent status bar



Modified: pypy/trunk/src/pypy/translator/tool/pygame/graphdisplay.py
==============================================================================
--- pypy/trunk/src/pypy/translator/tool/pygame/graphdisplay.py	(original)
+++ pypy/trunk/src/pypy/translator/tool/pygame/graphdisplay.py	Tue Nov 16 11:27:46 2004
@@ -191,11 +191,15 @@
         
         y = self.height - totalh
         self.status_bar_height = totalh + 16
-        self.screen.fill(bgcolor, (0, y-16, self.width, self.status_bar_height))
+        block = pygame.Surface((self.width, self.status_bar_height), SWSURFACE | SRCALPHA)
+        block.fill(bgcolor)
+        sy = 16
         for img in lines:
             w, h = img.get_size()
-            self.screen.blit(img, ((self.width-w)//2, y-8))
-            y += h
+            block.blit(img, ((self.width-w)//2, sy-8))
+            sy += h
+        block.set_alpha(int(255 * 0.75))
+        self.screen.blit(block, (0, y-16))
 
     def notifymousepos(self, pos):
         word = self.viewer.at_position(pos)



More information about the Pypy-commit mailing list