changeset 227:ebb62654f61f

finalized main menu
author Rizmari Versfeld <rizziepit@gmail.com>
date Sat, 12 May 2012 23:09:16 +0200
parents 2f229b917959
children 3955d126ca26
files data/images/main_background.jpg data/images/temp.jpg gamelib/mainmenu.py
diffstat 3 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
Binary file data/images/main_background.jpg has changed
Binary file data/images/temp.jpg has changed
--- a/gamelib/mainmenu.py	Sat May 12 21:25:50 2012 +0200
+++ b/gamelib/mainmenu.py	Sat May 12 23:09:16 2012 +0200
@@ -33,8 +33,7 @@
 class NewGameButton(MainMenuButton):
 
     def __init__(self, parent):
-        super(NewGameButton, self).__init__(((WIDTH - self.WIDTH) / 2,
-            (HEIGHT - self.HEIGHT) / 2 - self.HEIGHT),
+        super(NewGameButton, self).__init__((400, 100),
                 'Start New Game')
         self.parent = parent
 
@@ -45,8 +44,7 @@
 class ResumeGameButton(MainMenuButton):
 
     def __init__(self, parent):
-        super(ResumeGameButton, self).__init__(((WIDTH - self.WIDTH) / 2,
-            (HEIGHT - self.HEIGHT) / 2), 'Resume Game')
+        super(ResumeGameButton, self).__init__((400, 170), 'Resume Game')
         self.parent = parent
 
     def on_click(self):
@@ -56,8 +54,7 @@
 class QuitButton(MainMenuButton):
 
     def __init__(self):
-        super(QuitButton, self).__init__(((WIDTH - self.WIDTH) / 2,
-            (HEIGHT - self.HEIGHT) / 2 + self.HEIGHT), 'Quit')
+        super(QuitButton, self).__init__((400, 240), 'Quit')
 
     def on_click(self):
         pygame.event.post(pygame.event.Event(pygame.QUIT))
@@ -71,7 +68,7 @@
         self.resume = None
         self.screen = screen
         self.background_colour = (0, 0, 0)
-        self.background_image = image.load(data.filepath('images/temp.jpg'))
+        self.background_image = image.load(data.filepath('images/main_background.jpg'))
         button1 = NewGameButton(self)
         self.add_child(button1)
         button2 = QuitButton()