Example #1
0
 def update_windows(self, display):
     '''Update the display of all windows on the screen
     '''
     self.windows = Windows()
     self.stdscr.clear()
     for wname, wlst in self.displays[display].iteritems():
         self.windows[wname] = self.create_window(wlst[0], wlst[1], wlst[2], wlst[3])
Example #2
0
 def __init__(self, game):
     TextUI.__init__(self, game.num_rows, game.num_cols, game.icon)
     # key-entry constants
     self.printable = string.printable.translate(None, "\r\n\t\x0b\x0c")
     self.text_entry_specials = u'\u0114\r\x08\x7f'
     # important attributes
     self._game = game
     self._frame_rate = 30
     self._clock = None
     # dictionary-like containers for UI elements
     self.action_keys = ActionKeys()
     self.windows = Windows()
     self.displays = Displays()