Пример #1
0
 def dispossessUI(self):
     if self.uiHolder:
         self.uiHolder.removeExternalCallback(BTMS_COMMANDS.CheckCooldownPeriod(), self.__onCheckCooldownPeriod)
         self.uiHolder.removeExternalCallback(BTMS_COMMANDS.SendMessage(), self.__onSendChannelMessage)
         self.uiHolder.removeExternalCallback(BTMS_COMMANDS.ReceiverChanged(), self.__onReceiverChanged)
     super(BattleChannelView, self).dispossessUI()
     self.__controllers.clear()
     self.__sharedHistory = lambda : None
Пример #2
0
 def populateUI(self, proxy):
     super(BattleChannelView, self).populateUI(proxy)
     self.uiHolder.addExternalCallbacks({
         BTMS_COMMANDS.CheckCooldownPeriod():
         self.__onCheckCooldownPeriod,
         BTMS_COMMANDS.SendMessage():
         self.__onSendChannelMessage,
         BTMS_COMMANDS.ReceiverChanged():
         self.__onReceiverChanged
     })
Пример #3
0
 def dispossessUI(self):
     if self.uiHolder:
         self.uiHolder.removeExternalCallback(
             BTMS_COMMANDS.CheckCooldownPeriod(),
             self.__onCheckCooldownPeriod)
         self.uiHolder.removeExternalCallback(BTMS_COMMANDS.SendMessage(),
                                              self.__onSendChannelMessage)
         self.uiHolder.removeExternalCallback(
             BTMS_COMMANDS.ReceiverChanged(), self.__onReceiverChanged)
     super(BattleChannelView, self).dispossessUI()
Пример #4
0
 def populateUI(self, proxy):
     super(BattleChannelView, self).populateUI(proxy)
     self.uiHolder.addExternalCallbacks({
         BTMS_COMMANDS.CheckCooldownPeriod():
         self.__onCheckCooldownPeriod,
         BTMS_COMMANDS.SendMessage():
         self.__onSendChannelMessage,
         BTMS_COMMANDS.ReceiverChanged():
         self.__onReceiverChanged
     })
     controller = self._controller()
     if controller and controller.getChannel().isJoined():
         self.setJoined()
Пример #5
0
 def dispossessUI(self):
     self.__flashCall(BTMS_COMMANDS.ClearMessages())
     if self.__ui:
         self.__ui.removeExternalCallbacks(
             BTMS_COMMANDS.PopulateUI(),
             BTMS_COMMANDS.CheckCooldownPeriod(),
             BTMS_COMMANDS.SendMessage(), BTMS_COMMANDS.ChangeFocus(),
             BTMS_COMMANDS.AddToFriends(),
             BTMS_COMMANDS.RemoveFromFriends(),
             BTMS_COMMANDS.AddToIgnored(),
             BTMS_COMMANDS.RemoveFromIgnored(), BTMS_COMMANDS.AddMuted(),
             BTMS_COMMANDS.RemoveMuted(), BTMS_COMMANDS.upHistory(),
             BTMS_COMMANDS.downHistory(), BTMS_COMMANDS.GetLatestHistory())
     if self.__view:
         self.__view.dispossessUI()
         self.__view = None
     self.__ui = None
Пример #6
0
    def dispossessUI(self):
        self.__flashCall(BTMS_COMMANDS.ClearMessages())
        if self.__ui:
            self.__ui.removeExternalCallbacks(BTMS_COMMANDS.PopulateUI(), BTMS_COMMANDS.CheckCooldownPeriod(), BTMS_COMMANDS.SendMessage(), BTMS_COMMANDS.ChangeFocus(), BTMS_COMMANDS.AddToFriends(), BTMS_COMMANDS.RemoveFromFriends(), BTMS_COMMANDS.AddToIgnored(), BTMS_COMMANDS.RemoveFromIgnored(), BTMS_COMMANDS.AddMuted(), BTMS_COMMANDS.RemoveMuted())
        while len(self.__views):
            self.__views.pop().dispossessUI()

        self.__ui = None
        return