Exemplo n.º 1
0
 def __getMainButtonLabel(self, rootItem, rootNode):
     if NODE_STATE.isCollectible(rootNode.getState()):
         btnLabel = R.strings.menu.research.labels.button.toCollection()
     elif not rootItem.isUnlocked:
         btnLabel = R.strings.menu.unlocks.unlockButton()
     elif NODE_STATE.isRestoreAvailable(rootNode.getState()):
         btnLabel = R.strings.menu.research.labels.button.restore()
     elif NODE_STATE.inInventory(rootNode.getState(
     )) and not rootItem.isRented or rootItem.isHidden:
         btnLabel = R.strings.menu.research.labels.button.showInHangar()
     elif NODE_STATE.canTradeIn(rootNode.getState(
     )) and self.__tradeIn.getActiveTradeOffVehicle() is not None:
         btnLabel = R.strings.menu.research.labels.button.trade_in()
     else:
         btnLabel = R.strings.menu.research.labels.button.buy()
     return backport.text(btnLabel)
Exemplo n.º 2
0
 def invalidateVehicleCollectorState(self):
     rootNode = self._data.getRootNode()
     if not NODE_STATE.isCollectible(rootNode.getState()):
         return
     super(Research, self).invalidateVehicleCollectorState()