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


Python RemoveStatusIcon.subscribe方法代码示例

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


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

示例1: __init__

# 需要导入模块: from horizons.messaging import RemoveStatusIcon [as 别名]
# 或者: from horizons.messaging.RemoveStatusIcon import subscribe [as 别名]
	def __init__(self, session):
		self.session = session
		# {instance: [list of icons]}
		self.icons = {}
		# Renderer used to render the icons
		self.renderer = self.session.view.renderer['GenericRenderer']

		AddStatusIcon.subscribe(self.on_add_icon_message)
		RemoveStatusIcon.subscribe(self.on_remove_icon_message)
		WorldObjectDeleted.subscribe(self.on_worldobject_deleted_message)
开发者ID:savionok,项目名称:unknown-horizons,代码行数:12,代码来源:statusiconmanager.py

示例2: __init__

# 需要导入模块: from horizons.messaging import RemoveStatusIcon [as 别名]
# 或者: from horizons.messaging.RemoveStatusIcon import subscribe [as 别名]
	def __init__(self, session):
		self.session = session
		# {instance: [list of icons]}
		self.icons = {}
		# Renderer used to render the icons
		self.renderer = self.session.view.renderer['GenericRenderer']

		self.tooltip_instance = None # no weakref:
		# we need to remove the tooltip always anyway, and along with it the entry here
		self.tooltip_icon = Icon(position=(1,1)) # 0, 0 is currently not supported by tooltips

		AddStatusIcon.subscribe(self.on_add_icon_message)
		HoverInstancesChanged.subscribe(self.on_hover_instances_changed)
		RemoveStatusIcon.subscribe(self.on_remove_icon_message)
		WorldObjectDeleted.subscribe(self.on_worldobject_deleted_message)
开发者ID:mage666,项目名称:unknown-horizons,代码行数:17,代码来源:statusiconmanager.py

示例3: __init__

# 需要导入模块: from horizons.messaging import RemoveStatusIcon [as 别名]
# 或者: from horizons.messaging.RemoveStatusIcon import subscribe [as 别名]
	def __init__(self, renderer, layer):
		"""
		@param renderer: Renderer used to render the icons
		@param layer: map layer, needed to place icon
		"""
		self.layer = layer
		self.renderer = renderer

		# {instance: [list of icons]}
		self.icons = {}

		self.tooltip_instance = None # no weakref:
		# we need to remove the tooltip always anyway, and along with it the entry here
		self.tooltip_icon = Icon(position=(1, 1)) # 0, 0 is currently not supported by tooltips

		AddStatusIcon.subscribe(self.on_add_icon_message)
		HoverInstancesChanged.subscribe(self.on_hover_instances_changed)
		RemoveStatusIcon.subscribe(self.on_remove_icon_message)
		WorldObjectDeleted.subscribe(self.on_worldobject_deleted_message)
开发者ID:BenjaminHarper,项目名称:unknown-horizons,代码行数:21,代码来源:statusiconmanager.py


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