本文整理汇总了Python中gui.Scaleform.daapi.view.lobby.techtree.settings.SelectedNation类的典型用法代码示例。如果您正苦于以下问题:Python SelectedNation类的具体用法?Python SelectedNation怎么用?Python SelectedNation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SelectedNation类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _resolveLoadCtx
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
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
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
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()
示例5: dump
def dump(self, data):
self.clear()
nodes = data._nodes
itemGetter = data.getItem
self._cache['nodes'] = map(lambda node: self._getVehicleData(node, itemGetter(node['id'])), nodes)
self._cache['scrollIndex'] = data._scrollIndex
self._cache['displaySettings'].update(g_techTreeDP.getDisplaySettings(SelectedNation.getIndex()))
return self._cache
示例6: requestNationTreeData
def requestNationTreeData(self):
"""
Overridden method of the class _Py_ScriptHandler.requestNationTreeData.
"""
if USE_XML_DUMPING and IS_DEVELOPMENT:
self.as_useXMLDumpingS()
self.as_setAvailableNationsS(g_techTreeDP.getAvailableNations())
self.as_setSelectedNationS(SelectedNation.getName())
return True
示例7: invalidateVehLocks
def invalidateVehLocks(self, locks):
if self._data.invalidateLocks(locks):
self.as_refreshNationTreeDataS(SelectedNation.getName())
示例8: goToNextVehicle
def goToNextVehicle(self, vehCD):
exitEvent = events.LoadViewEvent(VIEW_ALIAS.LOBBY_TECHTREE, ctx={'nation': SelectedNation.getName()})
loadEvent = events.LoadViewEvent(VIEW_ALIAS.LOBBY_RESEARCH, ctx={'rootCD': vehCD,
'exit': exitEvent})
self.fireEvent(loadEvent, scope=EVENT_BUS_SCOPE.LOBBY)
示例9: requestNationTreeData
def requestNationTreeData(self):
if USE_XML_DUMPING and IS_DEVELOPMENT:
self.as_useXMLDumpingS()
self.as_setAvailableNationsS(g_techTreeDP.getAvailableNations())
self.as_setSelectedNationS(SelectedNation.getName())
return True
示例10: redraw
def redraw(self):
self.as_refreshNationTreeDataS(SelectedNation.getName())
示例11: __handleReloadData
def __handleReloadData(self, event):
if event.key is Keys.KEY_R:
g_techTreeDP.load(isReload=True)
self.as_refreshNationTreeDataS(SelectedNation.getName())
示例12: __onUpdateStage
def __onUpdateStage(self):
g_techTreeDP.setOverride(self._getOverride())
if g_techTreeDP.load():
self.as_refreshNationTreeDataS(SelectedNation.getName())