diff gamelib/gamegui.py @ 212:16ce5ed563c9

Change science buttons
author Neil Muller <drnlmuller@gmail.com>
date Sat, 12 May 2012 20:17:28 +0200
parents eb4516169b3c
children 0a441ded8a83
line wrap: on
line diff
--- a/gamelib/gamegui.py	Sat May 12 20:20:26 2012 +0200
+++ b/gamelib/gamegui.py	Sat May 12 20:17:28 2012 +0200
@@ -124,7 +124,8 @@
             pos, science.get_image_name(), self.make_text(), font_small)
 
     def make_text(self):
-        name = self.science.NAME[:4]
+        #name = self.science.NAME[:4]
+        name = self.science.NAME
         text = '%s: %d' % (name, self.science.points)
         if self.points > 0:
             text = "%s + %d" % (text, self.points)
@@ -577,10 +578,10 @@
                 widget = ScienceWidget(science, (x, y), self)
                 self.add_child(widget)
                 self._sciences.append(widget)
-                x += 200
+                x += widget.WIDTH + 10
                 if x >= WIDTH:
                     x = 0
-                    y += 100
+                    y += widget.HEIGHT + 5
 
     def end_turn(self):
         # Drop back to the research screen
@@ -647,10 +648,10 @@
                 widget = ScienceWidget(science, (x, y), self)
                 self.add_child(widget)
                 self._sciences.append(widget)
-                x += 200
+                x += widget.WIDTH + 10
                 if x >= WIDTH:
                     x = 0
-                    y += 100
+                    y += widget.HEIGHT + 5
 
     def update_widgets(self):
         self._make_science_widgets()