Esempio n. 1
0
 def __init__(self, viewport):
     """
     Constructor.
     """
     BaseWorld.__init__(self, viewport)
     UIProxyReceiver.__init__(self)
     self.charset = GetCharset()
     self.repository = images.ImageRepository()
     self.avatars = AvatarRepository()
     self.avatars.AskNotify(UIProxy(self).UpdateAvatars)
Esempio n. 2
0
 def _UpdateNode(self, node):
     """
     Called when the node's characteristics are updated.
     """
     item = BaseWorld._UpdateNode(self, node)
     # Update node pseudo
     if item.label_id:
         self.viewport.RemoveDrawable(node.id_, item.label_id)
         item.label_id = None
     self._CreatePeerLabel(item)
     # Create avatar if necessary
     if item.avatar_id:
         self.viewport.RemoveDrawable(node.id_, item.avatar_id)
         item.avatar_id = None
     self._CreatePeerAvatar(item)