From: <Blu...@us...> - 2010-07-28 16:06:53
|
Revision: 341 http://virtplayground.svn.sourceforge.net/virtplayground/?rev=341&view=rev Author: BlueWolf_ Date: 2010-07-28 16:06:43 +0000 (Wed, 28 Jul 2010) Log Message: ----------- Starting with the interface here as well! :D Modified Paths: -------------- trunk/client/VP.py trunk/client/layout.py trunk/client/playground.py trunk/client/windows.py Added Paths: ----------- trunk/client/images/ trunk/client/images/loginbg.png trunk/client/images/topbar1.png trunk/client/images/topbar2.png trunk/client/images/topbar3.png Modified: trunk/client/VP.py =================================================================== --- trunk/client/VP.py 2010-07-28 15:37:05 UTC (rev 340) +++ trunk/client/VP.py 2010-07-28 16:06:43 UTC (rev 341) @@ -21,8 +21,11 @@ pygame.key.set_repeat(250, 40) pygame.scrap.init() - # Give the surfaces a way to blit themselves + # Give the surfaces a way to blit itself sh['update'] = self.update + + sh['status'] = "login" # What the user is seeing + # login - playground # Create all our surfaces sh['playground'] = Playground() @@ -43,7 +46,10 @@ pos = pygame.mouse.get_pos() pygame.event.clear(MOUSEMOTION) - # [TODO] Do something + # Send through all the layers + if sh['windows'].event(ev): continue + if sh['layout'].event(ev): continue + if sh['playground'].event(ev): continue except KeyboardInterrupt: # Note: this does not work properly @@ -60,8 +66,7 @@ and update the screen """ - # Prevent multiple threads blitting at - # the same time + # Prevent multiple threads from blitting at the same time self.blit_lock.acquire() sh['screen'].blit(sh['playground'].surf, rect, rect) Added: trunk/client/images/loginbg.png =================================================================== (Binary files differ) Property changes on: trunk/client/images/loginbg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/client/images/topbar1.png =================================================================== (Binary files differ) Property changes on: trunk/client/images/topbar1.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/client/images/topbar2.png =================================================================== (Binary files differ) Property changes on: trunk/client/images/topbar2.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/client/images/topbar3.png =================================================================== (Binary files differ) Property changes on: trunk/client/images/topbar3.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/client/layout.py =================================================================== --- trunk/client/layout.py 2010-07-28 15:37:05 UTC (rev 340) +++ trunk/client/layout.py 2010-07-28 16:06:43 UTC (rev 341) @@ -5,4 +5,5 @@ self.surf = pygame.Surface((1000, 700), \ SRCALPHA).convert_alpha() - self.surf.fill([0,100,0], Rect(100,100, 150,150)) + def event(self, ev): + pass Modified: trunk/client/playground.py =================================================================== --- trunk/client/playground.py 2010-07-28 15:37:05 UTC (rev 340) +++ trunk/client/playground.py 2010-07-28 16:06:43 UTC (rev 341) @@ -6,3 +6,13 @@ SRCALPHA).convert_alpha() self.surf.fill([0,0,0]) + + self.loginbg = None + self.drawlogin() + + def event(self, ev): + print ev + + def drawlogin(self): + self.loginbg = load_image(False, "images", "loginbg.png") + self.surf.blit(self.loginbg, (0,0)) Modified: trunk/client/windows.py =================================================================== --- trunk/client/windows.py 2010-07-28 15:37:05 UTC (rev 340) +++ trunk/client/windows.py 2010-07-28 16:06:43 UTC (rev 341) @@ -4,3 +4,6 @@ def __init__(self): self.surf = pygame.Surface((1000, 700), \ SRCALPHA).convert_alpha() + + def event(self, ev): + pass This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |