本文整理汇总了Python中gui.Scaleform.daapi.view.lobby.techtree.settings.SelectedNation.select方法的典型用法代码示例。如果您正苦于以下问题:Python SelectedNation.select方法的具体用法?Python SelectedNation.select怎么用?Python SelectedNation.select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gui.Scaleform.daapi.view.lobby.techtree.settings.SelectedNation
的用法示例。
在下文中一共展示了SelectedNation.select方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _resolveLoadCtx
# 需要导入模块: from gui.Scaleform.daapi.view.lobby.techtree.settings import SelectedNation [as 别名]
# 或者: from gui.Scaleform.daapi.view.lobby.techtree.settings.SelectedNation import select [as 别名]
def _resolveLoadCtx(self, ctx=None):
nation = ctx["nation"] if ctx is not None and "nation" in ctx else None
if nation is not None and nation in nations.INDICES:
nationIdx = nations.INDICES[nation]
SelectedNation.select(nationIdx)
else:
SelectedNation.byDefault()
示例2: getNationTreeData
# 需要导入模块: from gui.Scaleform.daapi.view.lobby.techtree.settings import SelectedNation [as 别名]
# 或者: from gui.Scaleform.daapi.view.lobby.techtree.settings.SelectedNation import select [as 别名]
def getNationTreeData(self, nationName):
if nationName not in nations.INDICES:
LOG_ERROR('Nation not found', nationName)
return {}
nationIdx = nations.INDICES[nationName]
SelectedNation.select(nationIdx)
self._data.load(nationIdx, override=self._getOverride())
return self._data.dump()
示例3: _resolveLoadCtx
# 需要导入模块: from gui.Scaleform.daapi.view.lobby.techtree.settings import SelectedNation [as 别名]
# 或者: from gui.Scaleform.daapi.view.lobby.techtree.settings.SelectedNation import select [as 别名]
def _resolveLoadCtx(self, ctx = None):
rootCD = ctx['rootCD'] if ctx is not None and 'rootCD' in ctx else None
if rootCD is None:
if g_currentVehicle.isPresent():
self._data.setRootCD(g_currentVehicle.item.intCD)
else:
self._data.setRootCD(rootCD)
SelectedNation.select(self._data.getNationID())
示例4: getNationTreeData
# 需要导入模块: from gui.Scaleform.daapi.view.lobby.techtree.settings import SelectedNation [as 别名]
# 或者: from gui.Scaleform.daapi.view.lobby.techtree.settings.SelectedNation import select [as 别名]
def getNationTreeData(self, nationName):
"""
Overridden method of the class _Py_ScriptHandler.getNationTreeData.
"""
if nationName not in nations.INDICES:
LOG_ERROR('Nation not found', nationName)
return {}
nationIdx = nations.INDICES[nationName]
SelectedNation.select(nationIdx)
self._data.load(nationIdx, override=self._getOverride())
return self._data.dump()