当前位置: 首页>>代码示例>>Python>>正文


Python StartGameOptions.create_editor_load方法代码示例

本文整理汇总了Python中horizons.util.startgameoptions.StartGameOptions.create_editor_load方法的典型用法代码示例。如果您正苦于以下问题:Python StartGameOptions.create_editor_load方法的具体用法?Python StartGameOptions.create_editor_load怎么用?Python StartGameOptions.create_editor_load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在horizons.util.startgameoptions.StartGameOptions的用法示例。


在下文中一共展示了StartGameOptions.create_editor_load方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: act

# 需要导入模块: from horizons.util.startgameoptions import StartGameOptions [as 别名]
# 或者: from horizons.util.startgameoptions.StartGameOptions import create_editor_load [as 别名]
	def act(self):
		for size in self.sizes:
			option_name = 'size_%d' % size
			if self._gui.findChild(name=option_name).marked:
				self._windows.close()

				# the empty list is interpreted as the empty list of random map island strings
				options = StartGameOptions.create_editor_load([])
				options.map_padding = size // 2
				horizons.main.start_singleplayer(options)
				return
开发者ID:STEVEOO6,项目名称:unknown-horizons,代码行数:13,代码来源:editorstartmenu.py

示例2: _edit_map

# 需要导入模块: from horizons.util.startgameoptions import StartGameOptions [as 别名]
# 或者: from horizons.util.startgameoptions.StartGameOptions import create_editor_load [as 别名]
def _edit_map(map_file):
	"""
	Start editing the specified map file.

	@param map_file: path to the map file or a list of random island strings
	@return: bool, whether loading succeeded
	"""
	if not map_file:
		return False

	options = StartGameOptions.create_editor_load(map_file)
	start_singleplayer(options)
	return True
开发者ID:Rareson,项目名称:unknown-horizons,代码行数:15,代码来源:main.py

示例3: act

# 需要导入模块: from horizons.util.startgameoptions import StartGameOptions [as 别名]
# 或者: from horizons.util.startgameoptions.StartGameOptions import create_editor_load [as 别名]
	def act(self):
		for size in self.sizes:
			option_name = 'size_%d' % size
			if self._gui.findChild(name=option_name).marked:
				self.parent.hide()
				self.parent.parent.show_loading_screen()

				# the empty list is interpreted as the empty list of random map island strings
				options = StartGameOptions.create_editor_load([])
				options.map_padding = size // 2
				session = horizons.main.start_singleplayer(options)
				session.world_editor = WorldEditor(session.world)
				return
开发者ID:Antagonym,项目名称:unknown-horizons,代码行数:15,代码来源:editorstartmenu.py

示例4: _edit_map

# 需要导入模块: from horizons.util.startgameoptions import StartGameOptions [as 别名]
# 或者: from horizons.util.startgameoptions.StartGameOptions import create_editor_load [as 别名]
def _edit_map(map_file):
	"""
	Start editing the specified map file.

	@param map_file: path to the map file or a list of random island strings
	@return: bool, whether loading succeeded
	"""
	if not map_file:
		return False

	options = StartGameOptions.create_editor_load(map_file)
	start_singleplayer(options)

	from horizons.editor.worldeditor import WorldEditor
	_modules.session.world_editor = WorldEditor(_modules.session.world)
	return True
开发者ID:Antagonym,项目名称:unknown-horizons,代码行数:18,代码来源:main.py


注:本文中的horizons.util.startgameoptions.StartGameOptions.create_editor_load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。