本文整理汇总了Python中pirates.piratesbase.PLocalizer.getTattooTypeName方法的典型用法代码示例。如果您正苦于以下问题:Python PLocalizer.getTattooTypeName方法的具体用法?Python PLocalizer.getTattooTypeName怎么用?Python PLocalizer.getTattooTypeName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pirates.piratesbase.PLocalizer
的用法示例。
在下文中一共展示了PLocalizer.getTattooTypeName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: showDetails
# 需要导入模块: from pirates.piratesbase import PLocalizer [as 别名]
# 或者: from pirates.piratesbase.PLocalizer import getTattooTypeName [as 别名]
def showDetails(self, cell, detailsPos, detailsHeight, event = None):
self.notify.debug('Item showDetails')
if self.manager.heldItem and self.manager.locked and cell.isEmpty() or not (self.itemTuple):
self.notify.debug(' early exit')
return None
itemId = self.getId()
self.helpFrame = DirectFrame(parent = self.manager, relief = None, state = DGG.DISABLED, sortOrder = 1)
self.helpFrame.setBin('gui-popup', -5)
detailGui = loader.loadModel('models/gui/gui_card_detail')
topGui = loader.loadModel('models/gui/toplevel_gui')
coinImage = topGui.find('**/treasure_w_coin*')
halfWidth = 0.29999999999999999
halfHeight = 0.20000000000000001
basePosX = cell.getX(aspect2d)
basePosZ = cell.getZ(aspect2d)
cellSizeX = 0.0
cellSizeZ = 0.0
if cell:
cellSizeX = cell.cellSizeX
cellSizeZ = cell.cellSizeZ
textScale = PiratesGuiGlobals.TextScaleMed
titleScale = PiratesGuiGlobals.TextScaleTitleSmall
if len(self.getName()) >= 30:
titleNameScale = PiratesGuiGlobals.TextScaleLarge
else:
titleNameScale = PiratesGuiGlobals.TextScaleExtraLarge
subtitleScale = PiratesGuiGlobals.TextScaleMed
iconScalar = 1.5
borderScaler = 0.25
splitHeight = 0.01
vMargin = 0.029999999999999999
runningVertPosition = 0.29999999999999999
runningSize = 0.0
labels = []
titleColor = PiratesGuiGlobals.TextFG6
rarity = ItemGlobals.getRarity(itemId)
rarityText = PLocalizer.getItemRarityName(rarity)
typeText = PLocalizer.getTattooTypeName(ItemGlobals.getType(itemId))
if rarity == ItemGlobals.CRUDE:
titleColor = PiratesGuiGlobals.TextFG24
elif rarity == ItemGlobals.COMMON:
titleColor = PiratesGuiGlobals.TextFG13
elif rarity == ItemGlobals.RARE:
titleColor = PiratesGuiGlobals.TextFG4
elif rarity == ItemGlobals.FAMED:
titleColor = PiratesGuiGlobals.TextFG5
titleLabel = DirectLabel(parent = self, relief = None, text = self.getName(), text_scale = titleNameScale, text_fg = titleColor, text_shadow = PiratesGuiGlobals.TextShadow, text_align = TextNode.ACenter, pos = (0.0, 0.0, runningVertPosition), text_pos = (0.0, -textScale))
self.bg.setColor(titleColor)
tHeight = 0.070000000000000007
titleLabel.setZ(runningVertPosition)
runningVertPosition -= tHeight
runningSize += tHeight
labels.append(titleLabel)
subtitleLabel = DirectLabel(parent = self, relief = None, text = 'slant%s %s' % (rarityText, typeText), text_scale = subtitleScale, text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, text_align = TextNode.ACenter, pos = (0.0, 0.0, runningVertPosition), text_pos = (0.0, -textScale))
subtHeight = 0.050000000000000003
subtitleLabel.setZ(subtHeight * 0.5 + runningVertPosition)
runningVertPosition -= subtHeight
runningSize += subtHeight
labels.append(subtitleLabel)
gender = localAvatar.style.gender
dna = HumanDNA.HumanDNA(gender)
dna.copy(localAvatar.style)
bodyShape = localAvatar.style.getBodyShape()
bodyHeight = localAvatar.style.getBodyHeight()
bodyOffset = 0.5
headOffset = 0
armOffset = 0
chestOffset = 0
if bodyShape == 0:
bodyOffset = 0.5
if gender == 'm':
headOffset = 0.69999999999999996
armOffset = 0.59999999999999998
chestOffset = 0.5
elif gender == 'f':
headOffset = 0.55000000000000004
armOffset = 0.5
chestOffset = 0.5
elif bodyShape == 1:
bodyOffset = 0.5
if gender == 'm':
headOffset = 0.10000000000000001
armOffset = 0.14999999999999999
elif gender == 'f':
headOffset = 0.40000000000000002
armOffset = 0.40000000000000002
chestOffset = 0.29999999999999999
elif bodyShape == 2:
bodyOffset = 0.5
if gender == 'f':
headOffset = -0.10000000000000001
elif bodyShape == 3:
bodyOffset = 0.5
if gender == 'm':
#.........这里部分代码省略.........