# HG changeset patch # User Neil Muller # Date 1359560003 -7200 # Node ID 6a345dcbb20985fee243e95fa6de75d4bab8339c # Parent b7e19b97d5e132849c53b6342c0ea3e2e34e75b1 Complete textification of the bridge computer diff -r b7e19b97d5e1 -r 6a345dcbb209 gamelib/scenes/bridge.py --- a/gamelib/scenes/bridge.py Wed Jan 30 13:54:42 2013 +0200 +++ b/gamelib/scenes/bridge.py Wed Jan 30 17:33:23 2013 +0200 @@ -576,8 +576,14 @@ NAVIGATION = 'bridge_nav_base.png' NAV_MESSAGES = { - 'engine offline': 'bridge_nav_engine.png', - 'life support': 'bridge_nav_life_support.png', + 'engine offline': [ + _("Engine Offline: Navigation Disabled")], + 'life support': [ + _("Life Support Marginal."), + _("Emergency Navigation Protocol Engaged."), + '', + _("Destination locked to:"), + _("Bounty Penal Colony Space Port, New South Australia")], } BACKGROUND = ALERT_BASE @@ -653,12 +659,22 @@ del self.things[thing.name] thing.scene = None + def _draw_nav_text(self, key): + surface = self._nav_background.copy() + xpos, ypos = self.ALERT_OFFSET + for line in self.NAV_MESSAGES[key]: + text = render_text(line, 'DejaVuSans-Bold.ttf', 18, + 'darkblue', (0, 0, 0, 0), self.resource, (600, 25), False) + surface.blit(text, (xpos, ypos)) + ypos = ypos + text.get_height() + self.ALERT_SPACING + return surface + def _get_nav_page(self): if not self.game.scenes['engine'].get_data('engine online'): - return self._nav_background.copy() + return self._draw_nav_text('engine offline') elif (not self.game.scenes['mess'].get_data('life support status') == 'fixed'): - return self._nav_background.copy() + return self._draw_nav_text('life support') else: for thing in self._nav_lines: if thing.name not in self.things: