diff gamelib/gamegui.py @ 161:6fdc985429a7

Display research advice.
author Jeremy Thurgood <firxen@gmail.com>
date Fri, 11 May 2012 22:29:23 +0200
parents abaf6853fe37
children be346a080548
line wrap: on
line diff
--- a/gamelib/gamegui.py	Fri May 11 22:26:39 2012 +0200
+++ b/gamelib/gamegui.py	Fri May 11 22:29:23 2012 +0200
@@ -261,9 +261,9 @@
 
 class ValueLabel(TextLabel):
 
-    def __init__(self, pos, description):
+    def __init__(self, pos, description, width=300):
         self.description = description
-        rect = (pos[0], pos[1], 300, 20)
+        rect = (pos[0], pos[1], width, 20)
         super(ValueLabel, self).__init__(rect,
                 '%s : 0' % description, font_medium, (255, 255, 0))
 
@@ -448,7 +448,7 @@
 
         self.points = ValueLabel((10, 75), 'Available Human Resources')
         self.add_child(self.points)
-        self.minions = ValueLabel((310, 75), 'Minions available: ')
+        self.minions = ValueLabel((310, 75), 'Minions available')
         self.add_child(self.minions)
         self.money = ValueLabel((510, 75), 'Money')
         self.add_child(self.money)
@@ -458,12 +458,16 @@
         self.reputation = ValueLabel((310, 95), 'Reputation')
         self.add_child(self.reputation)
 
+        self.advice = ValueLabel((10, 115), 'Research advice', width=780)
+        self.add_child(self.advice)
+
     def update_labels(self):
         self.points.set_value(self.game.get_available_points())
         self.money.set_value(self.game.money)
         self.minions.set_value(self.game.minions)
         self.milestone.set_value(self.game.milestone)
         self.reputation.set_value(_lookup_reputation(self.game.reputation))
+        self.advice.set_value(self.game.advice)
 
 
 class ActivityWindow(GameStateWindow):