當前位置: 首頁>>代碼示例>>Python>>正文


Python CommandArgsParser.addArgs方法代碼示例

本文整理匯總了Python中gui.Scaleform.CommandArgsParser.CommandArgsParser.addArgs方法的典型用法代碼示例。如果您正苦於以下問題:Python CommandArgsParser.addArgs方法的具體用法?Python CommandArgsParser.addArgs怎麽用?Python CommandArgsParser.addArgs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在gui.Scaleform.CommandArgsParser.CommandArgsParser的用法示例。


在下文中一共展示了CommandArgsParser.addArgs方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: onRequestItemRange

# 需要導入模塊: from gui.Scaleform.CommandArgsParser import CommandArgsParser [as 別名]
# 或者: from gui.Scaleform.CommandArgsParser.CommandArgsParser import addArgs [as 別名]
    def onRequestItemRange(self, *args):
        parser = CommandArgsParser(self.onRequestItemRange.__name__, 2, [int, int])
        startIndex, endIndex = parser.parse(*args)
        for item in self.list[startIndex:endIndex + 1]:
            parser.addArgs(item)

        self.respond(parser.args())
開發者ID:19colt87,項目名稱:WOTDecompiled,代碼行數:9,代碼來源:data_providers.py

示例2: onRequestItemAt

# 需要導入模塊: from gui.Scaleform.CommandArgsParser import CommandArgsParser [as 別名]
# 或者: from gui.Scaleform.CommandArgsParser.CommandArgsParser import addArgs [as 別名]
 def onRequestItemAt(self, *args):
     parser = CommandArgsParser(self.onRequestItemAt.__name__, 1, [int])
     index, = parser.parse(*args)
     item = self.requestItemAt(index)
     if item:
         parser.addArgs(item)
     else:
         parser.addArgs(self.emptyItem())
     self.respond(parser.args())
開發者ID:19colt87,項目名稱:WOTDecompiled,代碼行數:11,代碼來源:data_providers.py

示例3: __onPopulateUI

# 需要導入模塊: from gui.Scaleform.CommandArgsParser import CommandArgsParser [as 別名]
# 或者: from gui.Scaleform.CommandArgsParser.CommandArgsParser import addArgs [as 別名]
 def __onPopulateUI(self, *args):
     LOG_DEBUG('[BattleMessanger]', '__onPopulateUI')
     settings = g_settings.battle
     parser = CommandArgsParser(self.__onPopulateUI.__name__)
     parser.parse(*args)
     parser.addArgs([settings.messageLifeCycle.lifeTime,
      settings.messageLifeCycle.alphaSpeed,
      settings.inactiveStateAlpha,
      CHAT_MESSAGE_MAX_LENGTH_IN_BATTLE,
      settings.hintText,
      settings.toolTipText,
      g_settings.userPrefs.storeReceiverInBattle])
     self.__flashRespond(parser.args())
開發者ID:19colt87,項目名稱:WOTDecompiled,代碼行數:15,代碼來源:battleentry.py

示例4: __onCheckCooldownPeriod

# 需要導入模塊: from gui.Scaleform.CommandArgsParser import CommandArgsParser [as 別名]
# 或者: from gui.Scaleform.CommandArgsParser.CommandArgsParser import addArgs [as 別名]
 def __onCheckCooldownPeriod(self, *args):
     parser = CommandArgsParser(self.__onCheckCooldownPeriod.__name__, 1, [long])
     (clientID,) = parser.parse(*args)
     controller = self.__getController(clientID)
     if not controller:
         return 
     (result, errorMsg,) = controller.canSendMessage()
     parser.addArgs([clientID, result])
     self.__flashRespond(parser.args())
     if not result:
         message = g_settings.htmlTemplates.format('battleErrorMessage', ctx={'error': errorMsg})
         history = self.__sharedHistory()
         if history:
             history.addMessage(message, False)
         self.__flashCall(BTMS_COMMANDS.ReceiveMessage(), [clientID, message, False])
開發者ID:Infernux,項目名稱:Projects,代碼行數:17,代碼來源:battlechannelview.py

示例5: __onCheckCooldownPeriod

# 需要導入模塊: from gui.Scaleform.CommandArgsParser import CommandArgsParser [as 別名]
# 或者: from gui.Scaleform.CommandArgsParser.CommandArgsParser import addArgs [as 別名]
 def __onCheckCooldownPeriod(self, *args):
     controller = self._controller()
     if controller is None:
         return
     else:
         parser = CommandArgsParser(self.__onCheckCooldownPeriod.__name__, 1, [long])
         channelID, = parser.parse(*args)
         if channelID == self._channelID:
             LOG_DEBUG('BattleChannelView.__onCheckCooldownPeriod', channelID)
             result, errorMsg = controller.canSendMessage()
             parser.addArgs([channelID, result])
             self.__flashRespond(parser.args())
             if not result:
                 message = g_settings.htmlTemplates.format('battleErrorMessage', ctx={'error': errorMsg})
                 self.__flashCall(BTMS_COMMANDS.ReceiveMessage(), [channelID, message, False])
         return
開發者ID:19colt87,項目名稱:WOTDecompiled,代碼行數:18,代碼來源:battlechannelview.py

示例6: __onPopulateUI

# 需要導入模塊: from gui.Scaleform.CommandArgsParser import CommandArgsParser [as 別名]
# 或者: from gui.Scaleform.CommandArgsParser.CommandArgsParser import addArgs [as 別名]
 def __onPopulateUI(self, *args):
     settings = g_settings.battle
     userSettings = g_settings.userPrefs
     parser = CommandArgsParser(self.__onPopulateUI.__name__)
     parser.parse(*args)
     parser.addArgs([settings.messageLifeCycle.lifeTime,
      settings.messageLifeCycle.alphaSpeed,
      settings.inactiveStateAlpha,
      CHAT_MESSAGE_MAX_LENGTH_IN_BATTLE,
      settings.hintText,
      self.__getToolTipText(),
      userSettings.storeReceiverInBattle,
      not userSettings.disableBattleChat])
     self.__flashRespond(parser.args())
     if self.__sharedHistory.isEnabled():
         self.__sharedHistory.syncCursor(True)
     self.__flashCall(BTMS_COMMANDS.isHistoryEnabled(), [bool(self.__sharedHistory.isEnabled()),
      self.__sharedHistory.numberOfMessages(),
      g_settings.battle.alphaForLastMessages,
      g_settings.battle.recoveredLatestMessages,
      g_settings.battle.lifeTimeRecoveredMessages])
     self.__updateHistoryControls()
開發者ID:Infernux,項目名稱:Projects,代碼行數:24,代碼來源:battleentry.py

示例7: __onGetScreenSize

# 需要導入模塊: from gui.Scaleform.CommandArgsParser import CommandArgsParser [as 別名]
# 或者: from gui.Scaleform.CommandArgsParser.CommandArgsParser import addArgs [as 別名]
 def __onGetScreenSize(self, *args):
     parser = CommandArgsParser(self.__onGetScreenSize.__name__)
     parser.parse(*args)
     parser.addArgs(list(GUI.screenResolution()))
     self.uiHolder.respond(parser.args())
開發者ID:aevitas,項目名稱:wotsdk,代碼行數:7,代碼來源:ScaleformTutorialLayout.py


注:本文中的gui.Scaleform.CommandArgsParser.CommandArgsParser.addArgs方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。