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


Python ItemGlobals.getColor方法代码示例

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


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

示例1: __init__

# 需要导入模块: from pirates.inventory import ItemGlobals [as 别名]
# 或者: from pirates.inventory.ItemGlobals import getColor [as 别名]
 def __init__(self, manager, itemTuple, imageScaleFactor = 1.0):
     InventoryUIItem.InventoryUIItem.__init__(self, manager, itemTuple, imageScaleFactor = imageScaleFactor)
     self.initialiseoptions(InventoryUIClothingItem)
     self['relief'] = None
     tailorGui = loader.loadModel('models/gui/gui_icons_clothing')
     iconName = ItemGlobals.getIcon(itemTuple[1])
     self['image'] = tailorGui.find('**/%s' % iconName)
     self['image_scale'] = 0.10000000000000001 * imageScaleFactor
     iconColorIndex = ItemGlobals.getColor(itemTuple[1])
     dyeColor = itemTuple[3]
     if dyeColor:
         self.iconColor = (DYE_COLORS[dyeColor][0], DYE_COLORS[dyeColor][1], DYE_COLORS[dyeColor][2], 1.0)
     else:
         self.iconColor = (ItemConstants.COLOR_VALUES[iconColorIndex][0], ItemConstants.COLOR_VALUES[iconColorIndex][1], ItemConstants.COLOR_VALUES[iconColorIndex][2], 1.0)
     self['image_color'] = (self.iconColor[0], self.iconColor[1], self.iconColor[2], self.iconColor[3])
     self.helpFrame = None
     self.cm = CardMaker('itemCard')
     self.cm.setFrame(-0.29999999999999999, 0.29999999999999999, -0.089999999999999997, 0.089999999999999997)
     self.buffer = None
     self.lens = PerspectiveLens()
     self.lens.setNear(0.5)
     self.lens.setAspectRatio(0.59999999999999998 / 0.17999999999999999)
     self.realItem = None
     self.itemCard = None
     self.portraitSceneGraph = NodePath('PortraitSceneGraph')
     detailGui = loader.loadModel('models/gui/gui_card_detail')
     self.bg = detailGui.find('**/color')
     self.bg.setScale(4)
     self.bg.setPos(0, 17, -6.2999999999999998)
     self.glow = detailGui.find('**/glow')
     self.glow.setScale(3)
     self.glow.setPos(0, 17, -6.2999999999999998)
     self.glow.setColor(1, 1, 1, 0.80000000000000004)
     self.setBin('gui-fixed', 1)
     self.accept('open_main_window', self.createBuffer)
     self.accept('aspectRatioChanged', self.createBuffer)
     self.accept('close_main_window', self.destroyBuffer)
     self.displayHuman = self.manager.getDisplayHuman()
     self.masterHuman = self.manager.getMasterHuman()
开发者ID:TTGhost,项目名称:POTCOR-src,代码行数:41,代码来源:InventoryUIClothingItem.py


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