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


Python piratesbase.PLocalizer类代码示例

本文整理汇总了Python中pirates.piratesbase.PLocalizer的典型用法代码示例。如果您正苦于以下问题:Python PLocalizer类的具体用法?Python PLocalizer怎么用?Python PLocalizer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: loadData

 def loadData(self):
     itemId = self.data[0]
     (item, quantity) = self.data
     self.quantity = quantity
     itemType = EconomyGlobals.getItemType(itemId)
     if itemType <= ItemType.WAND:
         itemTypeName = PLocalizer.getItemSubtypeName(ItemGlobals.getSubtype(itemId))
     else:
         itemTypeName = PLocalizer.InventoryItemClassNames.get(itemType)
     if itemType <= ItemType.WAND or itemType == ItemType.POTION:
         name = PLocalizer.getItemName(itemId)
         self.price = ItemGlobals.getGoldCost(itemId)
     else:
         name = PLocalizer.InventoryTypeNames.get(item)
         self.price = EconomyGlobals.getItemCost(item)
     if self.sell:
         self.price /= 2
     
     if self.buy:
         if itemType > ItemType.WAND and itemType != ItemType.POTION:
             self.quantity = EconomyGlobals.getItemQuantity(itemId)
         
         self.price *= self.quantity
         self.price = int(self.price)
     
     self.name = PLocalizer.makeHeadingString(name, 2)
     self.itemType = itemTypeName
     if itemType != ItemType.FISHING_LURE:
         if itemType != ItemType.POTION:
             self.minLvl = ItemGlobals.getWeaponRequirement(itemId)
         else:
             self.minLvl = 0
     else:
         self.minLvl = EconomyGlobals.getItemMinLevel(self.data[0])
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:34,代码来源:InventoryListItem.py

示例2: createGui

 def createGui(self):
     itemId = self.data[0]
     self.itemCount += 1
     self.itemQuantity = self.quantity
     self.itemCost = self.price
     self.picture = DirectFrame(parent = self, relief = None, state = DGG.DISABLED, pos = (0.035000000000000003, 0, 0.025000000000000001))
     self.quantityLabel = DirectLabel(parent = self, relief = None, state = DGG.DISABLED, text = str(self.quantity), text_fg = PiratesGuiGlobals.TextFG2, text_scale = PiratesGuiGlobals.TextScaleSmall * PLocalizer.getHeadingScale(2), text_align = TextNode.ARight, text_wordwrap = 11, pos = (0.1225, 0, 0.014999999999999999))
     if len(self.name) >= 39:
         textScale = PiratesGuiGlobals.TextScaleMicro * PLocalizer.getHeadingScale(2)
     elif len(self.name) >= 35:
         textScale = PiratesGuiGlobals.TextScaleTiny * PLocalizer.getHeadingScale(2)
     else:
         textScale = PiratesGuiGlobals.TextScaleSmall * PLocalizer.getHeadingScale(2)
     self.nameTag = DirectLabel(parent = self, relief = None, state = DGG.DISABLED, text = self.name, text_fg = PiratesGuiGlobals.TextFG2, text_scale = textScale, text_align = TextNode.ALeft, pos = (0.13, 0, 0.014999999999999999))
     self.costText = DirectLabel(parent = self, relief = None, state = DGG.DISABLED, image = InventoryListItem.coinImage, image_scale = 0.12, image_pos = Vec3(-0.0050000000000000001, 0, 0.012500000000000001), text = str(self.price), text_fg = PiratesGuiGlobals.TextFG2, text_scale = PiratesGuiGlobals.TextScaleSmall, text_align = TextNode.ARight, text_wordwrap = 11, text_pos = (-0.029999999999999999, 0, 0), pos = (self.width - 0.035000000000000003, 0, 0.014999999999999999), text_font = PiratesGlobals.getInterfaceFont())
     itemClass = EconomyGlobals.getItemCategory(itemId)
     itemType = EconomyGlobals.getItemType(itemId)
     if itemType == ItemType.FISHING_ROD or itemType == ItemType.FISHING_LURE:
         asset = EconomyGlobals.getItemIcons(itemId)
         if asset:
             self.picture['geom'] = PurchaseListItem.fishingIcons.find('**/%s*' % asset)
             self.picture['geom_scale'] = 0.040000000000000001
             self.picture['geom_pos'] = (0, 0, 0)
         
     elif itemClass == ItemType.WEAPON or itemClass == ItemType.POUCH:
         asset = EconomyGlobals.getItemIcons(itemId)
         if asset:
             self.picture['geom'] = InventoryListItem.weaponIcons.find('**/%s*' % asset)
             self.picture['geom_scale'] = 0.040000000000000001
             self.picture['geom_pos'] = (0, 0, 0)
         
     elif itemClass == ItemType.CONSUMABLE:
         asset = EconomyGlobals.getItemIcons(itemId)
         if asset:
             self.picture['geom'] = InventoryListItem.skillIcons.find('**/%s*' % asset)
             self.picture['geom_scale'] = 0.040000000000000001
             self.picture['geom_pos'] = (0, 0, 0)
         
     
     if not InventoryType.begin_WeaponCannonAmmo <= itemId or itemId <= InventoryType.end_WeaponCannonAmmo:
         if (InventoryType.begin_WeaponPistolAmmo <= itemId or itemId <= InventoryType.end_WeaponGrenadeAmmo or InventoryType.begin_WeaponDaggerAmmo <= itemId) and itemId <= InventoryType.end_WeaponDaggerAmmo:
             skillId = WeaponGlobals.getSkillIdForAmmoSkillId(itemId)
             if skillId:
                 asset = WeaponGlobals.getSkillIcon(skillId)
                 if asset:
                     self.picture['geom'] = InventoryListItem.skillIcons.find('**/%s' % asset)
                     self.picture['geom_scale'] = 0.059999999999999998
                     self.picture['geom_pos'] = (0, 0, 0)
                 
             
         elif InventoryType.SmallBottle <= itemId and itemId <= InventoryType.LargeBottle:
             self.picture['geom'] = self.topGui.find('**/main_gui_ship_bottle')
             self.picture['geom_scale'] = 0.10000000000000001
             self.picture['geom_pos'] = (0, 0, 0)
         
     self.flattenStrong()
开发者ID:TTGhost,项目名称:POTCOR-src,代码行数:56,代码来源:PurchaseListItem.py

示例3: checkPlayerInventory

 def checkPlayerInventory(self, itemId, extraQty = 0):
     if self.available:
         inventory = base.localAvatar.getInventory()
         currStock = inventory.getStackQuantity(itemId)
         currStockLimit = inventory.getStackLimit(itemId)
         if currStock == 0:
             if base.cr.newsManager.getHoliday(21):
                 pass
             if not (itemId in InventoryType.WinterHolidaySongs):
                 self.name = PLocalizer.makeHeadingString(PLocalizer.SongTitleUnknown, 2)
                 self.nameTag['text'] = PLocalizer.makeHeadingString(PLocalizer.SongTitleUnknown, 2)
                 self.itemTypeName['text'] = PLocalizer.makeHeadingString(PLocalizer.SongComingSoon, 1)
                 self.disable()
             
         not (itemId in InventoryType.WinterHolidaySongs)
开发者ID:TTGhost,项目名称:POTCOR-src,代码行数:15,代码来源:SongItemGui.py

示例4: __init__

 def __init__(self, uid):
     SimpleEconomyItem.__init__(self, uid)
     self.icon = self.Icons.find('**/%s' % EconomyGlobals.getItemIcons(uid))
     if uid in range(InventoryType.begin_PistolPouches, InventoryType.end_PistolPouches):
         self.shortDesc = PLocalizer.makeHeadingString(PLocalizer.InventoryItemClassNames.get(ItemType.PISTOL), 1)
     elif uid in range(InventoryType.begin_DaggerPouches, InventoryType.end_DaggerPouches):
         self.shortDesc = PLocalizer.makeHeadingString(PLocalizer.InventoryItemClassNames.get(ItemType.DAGGER), 1)
     elif uid in range(InventoryType.begin_GrenadePouches, InventoryType.end_GrenadePouches):
         self.shortDesc = PLocalizer.makeHeadingString(PLocalizer.GrenadeShort, 1)
     elif uid in range(InventoryType.begin_CannonPouches, InventoryType.end_CannonPouches):
         self.shortDesc = PLocalizer.makeHeadingString(PLocalizer.ShipCannonShort, 1)
     else:
         self.shortDesc = PLocalizer.makeHeadingString(self.itemType, 1)
     self.itemName = self.shortDesc
     self.longDesc = self.shortDesc
开发者ID:TTGhost,项目名称:POTCOR-src,代码行数:15,代码来源:SimpleStoreItem.py

示例5: getCardName

def getCardName(value):
    if value == Unknown:
        return PLocalizer.PlayingCardUnknown
    else:
        rank = value % 13
        suit = value / 13
        return PLocalizer.getPlayingCardName(suit, rank)
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:7,代码来源:PlayingCardGlobals.py

示例6: getName

 def getName(self):
     itemTypeName = PLocalizer.getItemName(self.getId())
     clothingName = PLocalizer.TailorColorStrings.get(self.getColorId())
     if ItemGlobals.canDyeItem(self.getId()):
         return clothingName + ' ' + itemTypeName
     else:
         return itemTypeName
开发者ID:TTGhost,项目名称:POTCOR-src,代码行数:7,代码来源:InventoryUIClothingItem.py

示例7: checkSkillReq

 def checkSkillReq(self, skillId):
     if skillId in range(InventoryType.begin_FishingLures, InventoryType.end_FishingLures):
         return None
     
     if skillId:
         if base.localAvatar.getSkillQuantity(skillId) < 2:
             skillName = PLocalizer.getInventoryTypeName(skillId)
             self.highlightRed(PLocalizer.SkillRequirement % skillName)
开发者ID:TTGhost,项目名称:POTCOR-src,代码行数:8,代码来源:InventoryItemGui.py

示例8: createGui

    def createGui(self):
        (item, quantity) = self.data
        name = PLocalizer.InventoryTypeNames[item]
        self.price = EconomyGlobals.getItemCost(item)
        repId = InventoryType.SailingRep
        itemTypeName = PLocalizer.InventoryTypeNames.get(repId)
        self.itemType = itemTypeName
        if self.sell:
            self.price /= 2

        card = loader.loadModel("models/textureCards/shipCatalog")
        renderName = self.shipImageDict.get(item, "Catalog_War_Brig")
        myTexCard = card.find("**/%s*" % renderName)
        myTex = myTexCard.findAllTextures()[0]
        card.removeNode()
        del card
        self.minLvl = EconomyGlobals.getItemMinLevel(item)
        self.miscText = None
        self.picture = DirectFrame(
            parent=self,
            relief=None,
            state=DGG.DISABLED,
            image=myTex,
            image_scale=(0.070000000000000007, 1.0, 0.059999999999999998),
        )
        self.picture.setPos(0.10000000000000001, 0, 0.080000000000000002)
        self.picture.setTransparency(1)
        self.nameTag = DirectLabel(
            parent=self,
            state=DGG.DISABLED,
            relief=None,
            text=name,
            text_scale=PiratesGuiGlobals.TextScaleMed * PLocalizer.getHeadingScale(2),
            text_align=TextNode.ALeft,
            text_fg=PiratesGuiGlobals.TextFG1,
            text_shadow=PiratesGuiGlobals.TextShadow,
            textMayChange=0,
        )
        self.nameTag.setPos(0.20000000000000001, 0, 0.10000000000000001)
        self.costText = DirectLabel(
            parent=self,
            relief=None,
            state=DGG.DISABLED,
            geom=self.coinImage,
            geom_scale=0.12,
            geom_pos=Vec3(-0.01, 0, 0.01),
            text=str(self.price),
            text_scale=PiratesGuiGlobals.TextScaleSmall,
            text_align=TextNode.ARight,
            text_fg=PiratesGuiGlobals.TextFG2,
            text_shadow=PiratesGuiGlobals.TextShadow,
            text_wordwrap=11,
            text_pos=(-0.029999999999999999, 0, 0),
            text_font=PiratesGlobals.getInterfaceFont(),
        )
        self.costText.setPos(0.47999999999999998, 0, 0.040000000000000001)
开发者ID:TTGhost,项目名称:POTCOR-src,代码行数:56,代码来源:ShipItemGUI.py

示例9: sendBossMessage

 def sendBossMessage(self, message, good):
     if good:
         (text, sfx) = self.goodBossMessages[message]
     else:
         (text, sfx) = self.badBossMessages[message]
     text = PLocalizer.JollySays % text
     base.localAvatar.guiMgr.messageStack.addModalTextMessage(text, seconds = 8, priority = 0, color = PiratesGuiGlobals.TextFG14, icon = ('jolly', ''), modelName = 'general_frame_f')
     if self.canPlaySfx:
         base.playSfx(sfx)
     
     localAvatar.guiMgr.createProgressMsg(PLocalizer.InvasionJollyRogerComing % PLocalizer.getInvasionMainZoneName(self.holidayName), PiratesGuiGlobals.TextFG2)
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:11,代码来源:DistributedInvasionObject.py

示例10: createGui

 def createGui(self):
     itemId = self.data[0]
     self.nameTag = DirectLabel(parent = self, relief = None, state = DGG.DISABLED, text = self.name, text_scale = PiratesGuiGlobals.TextScaleSmall * PLocalizer.getHeadingScale(2), text_align = TextNode.ALeft, text_fg = PiratesGuiGlobals.TextFG1, text_shadow = PiratesGuiGlobals.TextShadow, pos = (0.16, 0, 0.105), text_font = PiratesGlobals.getInterfaceFont())
     if itemId in range(InventoryType.begin_PistolPouches, InventoryType.end_PistolPouches):
         self.itemTypeFormatted = PLocalizer.makeHeadingString(PLocalizer.InventoryItemClassNames.get(ItemType.PISTOL), 1)
     elif itemId in range(InventoryType.begin_DaggerPouches, InventoryType.end_DaggerPouches):
         self.itemTypeFormatted = PLocalizer.makeHeadingString(PLocalizer.InventoryItemClassNames.get(ItemType.DAGGER), 1)
     elif itemId in range(InventoryType.begin_GrenadePouches, InventoryType.end_GrenadePouches):
         self.itemTypeFormatted = PLocalizer.makeHeadingString(PLocalizer.GrenadeShort, 1)
     elif itemId in range(InventoryType.begin_CannonPouches, InventoryType.end_CannonPouches):
         self.itemTypeFormatted = PLocalizer.makeHeadingString(PLocalizer.ShipCannonShort, 1)
     else:
         self.itemTypeFormatted = PLocalizer.makeHeadingString(self.itemType, 1)
     self.itemTypeName = DirectLabel(parent = self, relief = None, state = DGG.DISABLED, text = self.itemTypeFormatted, text_scale = PiratesGuiGlobals.TextScaleSmall, text_align = TextNode.ALeft, text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, text_font = PiratesGlobals.getInterfaceFont(), pos = (0.16, 0, 0.065000000000000002))
     self.miscText = DirectLabel(parent = self, relief = None, state = DGG.DISABLED, text = '', text_scale = PiratesGuiGlobals.TextScaleSmall, text_align = TextNode.ALeft, text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, text_wordwrap = 11, pos = (0.16, 0, 0.025000000000000001))
     if self.minLvl > 0:
         repId = WeaponGlobals.getRepId(itemId)
         if repId:
             self.checkLevel(repId, self.minLvl)
         
     
     self.checkFreebooter(itemId, base.localAvatar.getDoId())
     trainingReq = EconomyGlobals.getItemTrainingReq(itemId)
     if trainingReq:
         self.checkTrainingReq(trainingReq)
     
     if EconomyGlobals.getItemCategory(itemId) == ItemType.AMMO:
         skillId = WeaponGlobals.getSkillIdForAmmoSkillId(itemId)
         self.checkSkillReq(skillId)
     
     self.checkInfamyReq(itemId)
     if self.buy:
         self.checkPlayerInventory(itemId)
     
     self.costText = DirectLabel(parent = self, relief = None, state = DGG.DISABLED, image = InventoryListItem.coinImage, image_scale = 0.12, image_pos = Vec3(-0.01, 0, 0.01), text = str(self.price), text_scale = PiratesGuiGlobals.TextScaleSmall, text_align = TextNode.ARight, text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, text_wordwrap = 11, text_pos = (-0.029999999999999999, 0, 0), pos = (self.width - 0.035000000000000003, 0, 0.065000000000000002), text_font = PiratesGlobals.getInterfaceFont())
     if self.quantity and self.quantity > 1:
         self.quantityLabel = DirectLabel(parent = self, relief = None, state = DGG.DISABLED, text = str(self.quantity), frameColor = (0, 0, 0, 1), frameSize = (-0.01, 0.02, -0.01, 0.025000000000000001), text_scale = 0.0275, text_align = TextNode.ACenter, text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, text_wordwrap = 11, pos = (0.02, 0, 0.025000000000000001), text_font = PiratesGlobals.getPirateBoldOutlineFont())
     
     geomParams = InventoryItemGui.getGeomParams(itemId)
     self.picture = DirectFrame(parent = self, relief = None, state = DGG.DISABLED, geom = geomParams['geom'], geom_pos = geomParams['geom_pos'], geom_scale = geomParams['geom_scale'], pos = (0.01, 0, 0.01))
     self.flattenStrong()
开发者ID:TTGhost,项目名称:POTCOR-src,代码行数:41,代码来源:InventoryItemGui.py

示例11: _getActor

 def _getActor(self, type = PiratesGlobals.VILLAGER_TEAM):
     if type == PiratesGlobals.VILLAGER_TEAM:
         return Townfolk.Townfolk()
     else:
         actor = Skeleton.Skeleton()
         (chosenType, self.possibleUndeadTypes) = AvatarTypes.pickPokerUndead(self.possibleUndeadTypes)
         self.possibleUndeadTypes.remove(chosenType)
         actor.setAvatarType(chosenType)
         (actor.name, self.possibleUndeadNames) = PLocalizer.pickPokerUndeadName(self.possibleUndeadNames)
         self.possibleUndeadNames.remove(actor.name)
         actor.addActive()
         actor.nametag3d.setPos(0, 0, 0)
     return actor
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:13,代码来源:DistributedGameTable.py

示例12: setLocalAvatarHand

 def setLocalAvatarHand(self, cardValues):
     map(lambda card: card.hide(), self.localStatusPanel.hand)
     self.localStatusPanel.cardScaler.setScale(0.5)
     for (card, newValue) in zip(self.localStatusPanel.hand, cardValues):
         card.show()
         card.setValue(newValue)
         if newValue != PlayingCardGlobals.Unknown:
             card.turnUp()
             continue
     
     handNameLabel = self.localStatusPanel.handNameLabel
     communityCardValues = map(lambda card: card.getValue(), self.communityCards)
     if cardValues and PlayingCardGlobals.Unknown not in cardValues:
         if self.handId == PlayingCardGlobals.Nothing or self.sortedCards == None:
             handNameLabel.hide()
         else:
             handName = PLocalizer.getHandNameFull(self.table.handIdToHandCode(self.handId), self.sortedCards)
             handNameLabel['text'] = handName
             handNameLabel.show()
     else:
         handNameLabel.hide()
开发者ID:XamarinDeveloper,项目名称:Pirates-Online-Source,代码行数:21,代码来源:PokerTableGUI.py

示例13: __init__

 def __init__(self, category, width = 0.40000000000000002):
     DirectFrame.__init__(self, parent = NodePath(), relief = None)
     self.initialiseoptions(ReputationMeter)
     self.category = category
     self.level = 0
     self.value = 0
     self.max = 0
     self.masteredIval = None
     name = PLocalizer.makeHeadingString(self.getCategoryName(), 2)
     self.categoryLabel = DirectLabel(parent = self, relief = None, text = name, text_scale = PiratesGuiGlobals.TextScaleLarge, text_align = TextNode.ALeft, text_shadow = PiratesGuiGlobals.TextShadow, pos = (-width * 0.5, 0, 0.02), textMayChange = 1)
     self.levelLabel = DirectLabel(parent = self, relief = None, text = '', text_scale = PiratesGuiGlobals.TextScaleLarge, text_align = TextNode.ARight, text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, pos = (width * 0.5, 0, 0.02), textMayChange = 1)
     gui = loader.loadModel('models/gui/ship_battle')
     guiModel = loader.loadModel('models/gui/toplevel_gui')
     self.meter = DirectWaitBar(parent = self, relief = DGG.FLAT, state = DGG.DISABLED, range = self.max, value = self.value, frameSize = (-width * 0.5, width * 0.5, -0.01, 0.01), frameColor = (65 / 255.0, 40 / 255.0, 8 / 255.0, 1), barColor = (223 / 255.0, 137 / 255.0, 28 / 255.0, 1), pos = (0, 0, 0.0))
     self.meterFrame = DirectFrame(parent = self.meter, relief = None, image = gui.find('**/ship_battle_speed_bar*'), image_scale = (width * 0.75, 1.0, 0.59999999999999998), pos = (0, 0, 0.0))
     self.clamp1 = DirectFrame(parent = self.meter, relief = None, image = guiModel.find('**/groggy_clamp'), image_scale = (0.14999999999999999, 1.0, 0.40000000000000002), image_color = (0.80000000000000004, 0.80000000000000004, 0.80000000000000004, 1.0), pos = (-width * 0.33300000000000002, 0, 0))
     self.clamp2 = DirectFrame(parent = self.meter, relief = None, image = guiModel.find('**/groggy_clamp'), image_scale = (0.14999999999999999, 1.0, 0.40000000000000002), image_color = (0.80000000000000004, 0.80000000000000004, 0.80000000000000004, 1.0), pos = (-width * 0.16700000000000001, 0, 0))
     self.clamp3 = DirectFrame(parent = self.meter, relief = None, image = guiModel.find('**/groggy_clamp'), image_scale = (0.14999999999999999, 1.0, 0.40000000000000002), image_color = (0.80000000000000004, 0.80000000000000004, 0.80000000000000004, 1.0), pos = (0, 0, 0))
     self.clamp4 = DirectFrame(parent = self.meter, relief = None, image = guiModel.find('**/groggy_clamp'), image_scale = (0.14999999999999999, 1.0, 0.40000000000000002), image_color = (0.80000000000000004, 0.80000000000000004, 0.80000000000000004, 1.0), pos = (width * 0.16700000000000001, 0, 0))
     self.clamp5 = DirectFrame(parent = self.meter, relief = None, image = guiModel.find('**/groggy_clamp'), image_scale = (0.14999999999999999, 1.0, 0.40000000000000002), image_color = (0.80000000000000004, 0.80000000000000004, 0.80000000000000004, 1.0), pos = (width * 0.33300000000000002, 0, 0))
     self.valueLabel = DirectLabel(parent = self.meter, relief = None, text = '', text_scale = PiratesGuiGlobals.TextScaleMed, text_align = TextNode.ACenter, text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, text_font = PiratesGlobals.getInterfaceFont(), text_pos = (0, 0.032000000000000001), pos = (0, 0, -0.01), textMayChange = 1)
     logoModel = loader.loadModel('models/gui/potcLogo')
     self.levelCapScroll = DirectFrame(parent = self.meter, relief = None, image = guiModel.find('**/main_gui_quest_scroll'))
     self.levelCapScroll.setPos(0.0, 0.0, 0.01)
     self.levelCapScroll.setScale(0.115, 1.0, 0.050000000000000003)
     self.levelCapScroll.hide()
     self.levelCapIcon = DirectFrame(parent = self.meter, relief = None, image = logoModel.find('**/skull'))
     self.levelCapIcon.setPos(0.0, 0.0, 0.025000000000000001)
     self.levelCapIcon.setScale(0.40000000000000002)
     self.levelCapIcon.setBin('gui-popup', 0)
     self.levelCapIcon.hide()
     self.masteredLabel = DirectLabel(parent = self.meter, relief = None, text = PLocalizer.RepCapText_Skill, text_scale = 0.044999999999999998, text_align = TextNode.ACenter, text_fg = PiratesGuiGlobals.TextFG1, text_shadow = PiratesGuiGlobals.TextShadow, text_font = PiratesGlobals.getInterfaceFont())
     self.masteredLabel.setPos(0.0, 0.0, -0.01)
     self.masteredLabel.hide()
     self.levelCapScroll.setTransparency(1)
     self.levelCapIcon.setTransparency(1)
     self.masteredLabel.setTransparency(1)
     self.update(self.value)
     self.flattenStrong()
开发者ID:TTGhost,项目名称:POTCOR-src,代码行数:39,代码来源:ReputationMeter.py

示例14: loadData

 def loadData(self):
     itemId = self.data[0]
     if UberDogGlobals.InventoryId.isStackable(itemId):
         (item, quantity) = self.data
         name = PLocalizer.InventoryTypeNames.get(item)
         self.quantity = 1
         itemType = None
         itemTypeName = None
         self.price = 5
     else:
         (category, doId) = self.data
         name = PLocalizer.InventoryCategoryNames.get(category)
         self.quantity = 1
         itemTypeName = 'Object'
         self.price = 5
     if self.buy:
         self.price *= self.quantity
         self.price = int(self.price)
     
     self.name = PLocalizer.makeHeadingString(name, 2)
     self.itemType = itemTypeName
     self.minLvl = EconomyGlobals.getItemMinLevel(self.data[0])
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:22,代码来源:SongListItem.py

示例15: createGui

 def createGui(self):
     itemId = self.data[0]
     (item, quantity) = self.data
     name = ItemGlobals.getName(item)
     itemType = ItemGlobals.getType(item)
     itemTypeName = name
     repCategory = ItemGlobals.getItemRepId(itemId)
     if quantity:
         repValue = localAvatar.getInventory().getReputation(repCategory)
         self.repMeter = ReputationMeter(repCategory, width = 0.66000000000000003)
         self.repMeter.setPos(0.62, 0, 0.041000000000000002)
         self.repMeter.update(repValue)
         self.repMeter.reparentTo(self)
         self.repMeter.flattenLight()
         hotkeyLabel = ''
         hotkeys = ()
         desc = PLocalizer.WeaponDescriptions.get(itemId)
         helpText = PLocalizer.InventoryTypeNames[repCategory]
         self.weaponButton = CombatTray.WeaponButton(hotkeys = hotkeys, hotkeyLabel = hotkeyLabel, helpOpaque = True, helpText = helpText, parent = self, showQuant = 0, pos = (0.10000000000000001, 0, -0.02), scale = 1.1000000000000001)
         self.weaponButton.ignoreHotkeys()
         self.weaponButton.setWeaponId(itemId)
         self.weaponButton['extraArgs'] = [
             itemId]
         self.weaponButton.helpDelay = 0
         self.weaponButton.helpPos = (0.12, 0, -0.040000000000000001)
         self.desc = DirectLabel(parent = self, relief = None, state = DGG.DISABLED, text = PLocalizer.WeaponAlreadyUnlocked, text_scale = PiratesGuiGlobals.TextScaleSmall, text_align = TextNode.ALeft, text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, pos = (0.28999999999999998, 0, -0.0050000000000000001), text_font = PiratesGlobals.getInterfaceFont())
     else:
         self.repMeter = None
         name = PLocalizer.makeHeadingString(PLocalizer.InventoryTypeNames[repCategory], 2)
         self.categoryLabel = DirectLabel(parent = self, relief = None, text = name, text_scale = PiratesGuiGlobals.TextScaleLarge, text_align = TextNode.ALeft, text_shadow = PiratesGuiGlobals.TextShadow, pos = (0.28999999999999998, 0, 0.059999999999999998), textMayChange = 0)
         self.weaponButton = CombatTray.WeaponButton(parent = self, state = DGG.DISABLED, showQuant = 0, scale = 1.1000000000000001)
         self.weaponButton.setPos(0.10000000000000001, 0, -0.02)
         self.weaponButton.setWeaponId(itemId)
         self.weaponButton.helpDelay = 0
         self.weaponButton.helpPos = (0.12, 0, -0.040000000000000001)
         unlockDesc = PLocalizer.WeaponUnlockText[repCategory]
         self.desc = DirectLabel(parent = self, relief = None, state = DGG.DISABLED, text = unlockDesc, text_scale = PiratesGuiGlobals.TextScaleSmall, text_align = TextNode.ALeft, text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, pos = (0.28999999999999998, 0, 0.025000000000000001), text_font = PiratesGlobals.getInterfaceFont())
         self.setColorScale(0.40000000000000002, 0.40000000000000002, 0.40000000000000002, 1, 1)
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:38,代码来源:WeaponPanel.py


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