def _update(self, state): if state.isInSpecialPrebattle(): self._isSelected = True self._isDisabled = state.hasLockedState else: self._isSelected = False self._isDisabled = areSpecBattlesHidden()
def pe_onPrebattleAutoInvitesChanged(self): if GUI_SETTINGS.specPrebatlesVisible: isHidden = prb_getters.areSpecBattlesHidden() if isHidden: g_eventDispatcher.removeSpecBattlesFromCarousel() else: g_eventDispatcher.addSpecBattlesToCarousel() g_eventDispatcher.updateUI()
def _update(self, state): if state.isInSpecialPrebattle( ) or self.__battleRoyaleTournamentController.isSelected(): self._isSelected = True self._isDisabled = state.hasLockedState else: self._isSelected = False self._isDisabled = areSpecBattlesHidden()
def start(self): g_eventDispatcher.init(self) result = self.__setFunctional(CreateFunctionalCtx()) self.__requestCtx = PrbCtrlRequestCtx() self.__startListening() functional.initDevFunctional() if result & FUNCTIONAL_FLAG.LOAD_PAGE == 0: BigWorld.callback(0.001, lambda: g_eventDispatcher.loadHangar()) g_eventDispatcher.updateUI() if GUI_SETTINGS.specPrebatlesVisible and not prb_getters.areSpecBattlesHidden(): g_eventDispatcher.addSpecBattlesToCarousel()
def start(self): g_eventDispatcher.init(self) result = self.__setFunctional(CreateFunctionalCtx()) self.__requestCtx = PrbCtrlRequestCtx() self.__startListening() functional.initDevFunctional() if result & FUNCTIONAL_FLAG.LOAD_PAGE == 0: BigWorld.callback(0.001, lambda: g_eventDispatcher.loadHangar()) g_eventDispatcher.updateUI() if GUI_SETTINGS.specPrebatlesVisible and not prb_getters.areSpecBattlesHidden( ): g_eventDispatcher.addSpecBattlesToCarousel()
def pe_onPrebattleAutoInvitesChanged(self): """ Player event listener for autoinvites state. Controls chat tab visibility of spec battles and updates UI. """ if GUI_SETTINGS.specPrebatlesVisible: isHidden = prb_getters.areSpecBattlesHidden() if isHidden: g_eventDispatcher.removeSpecBattlesFromCarousel() else: g_eventDispatcher.addSpecBattlesToCarousel() g_eventDispatcher.updateUI()
def start(self): if self.__isStarted: return self.__isStarted = True g_eventDispatcher.init(self) result = self.__setDefault() self.__startListening() initDevFunctional() if result & FUNCTIONAL_FLAG.LOAD_PAGE == 0: g_eventDispatcher.loadHangar() if GUI_SETTINGS.specPrebatlesVisible and not prb_getters.areSpecBattlesHidden(): g_eventDispatcher.addSpecBattlesToCarousel()
def start(self): """ Start is called when dispatcher should start its job and process events. """ g_eventDispatcher.init(self) result = self.__setDefault() self.__startListening() initDevFunctional() if result & FUNCTIONAL_FLAG.LOAD_PAGE == 0: g_eventDispatcher.loadHangar() if GUI_SETTINGS.specPrebatlesVisible and not prb_getters.areSpecBattlesHidden( ): g_eventDispatcher.addSpecBattlesToCarousel()