Ejemplo n.º 1
0
 def init(self, title, graphicsFile):
   """Given the graphics element of the configuration file, parses the
   properties therein and sets them as properties of the View class."""
   XMLroot = ElementTree.parse(graphicsFile).getroot()
   for configNode in XMLroot:
     setattr(self, configNode.tag, Util.convert(configNode.text))
   
   Input.init(self)
   TextManager.init()
   
   # Creates screen
   self._window = sfml.RenderWindow(sfml.VideoMode(self.WINDOW_WIDTH, self.WINDOW_HEIGHT), title)
   self._pane = NGUIPane(0, 0, self.WINDOW_WIDTH, self.WINDOW_HEIGHT)
   self._pane.name = "HumanView"
   self.mouseFocus = None