本文整理汇总了Python中src.toontown.toonbase.ToontownGlobals.getSuitFont方法的典型用法代码示例。如果您正苦于以下问题:Python ToontownGlobals.getSuitFont方法的具体用法?Python ToontownGlobals.getSuitFont怎么用?Python ToontownGlobals.getSuitFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类src.toontown.toonbase.ToontownGlobals
的用法示例。
在下文中一共展示了ToontownGlobals.getSuitFont方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def __init__(self):
Avatar.Avatar.__init__(self)
self.setFont(ToontownGlobals.getSuitFont())
self.nametag.setSpeechFont(ToontownGlobals.getSuitFont())
self.setPlayerType(NametagGroup.CCSuit)
self.setPickable(0)
self.doorA = None
self.doorB = None
self.bubbleL = None
self.bubbleR = None
self.raised = 1
self.forward = 1
self.happy = 1
self.dizzy = 0
self.nowRaised = 1
self.nowForward = 1
self.nowHappy = 1
self.currentAnimIval = None
self.queuedAnimIvals = []
self.treadsLeftPos = 0
self.treadsRightPos = 0
self.healthBar = None
self.healthCondition = 0
self.animDoneEvent = 'BossCogAnimDone'
self.animIvalName = 'BossCogAnimIval'
self.attackSpeed = 1
return
示例2: setupEndSection
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def setupEndSection(self, index):
aspectSF = 0.7227
self.endSectionNP = NodePath('EndSection')
self.endSectionNP.reparentTo(self.game.assetMgr.world)
self.endSectionNP.setX(self.incrementX)
self.endWall = self.game.assetMgr.startingWall.copyTo(self.endSectionNP)
self.endWall.setPos(100, 0, 4)
self.endWall.setScale(0.8)
self.endArrow = self.game.assetMgr.arrow.copyTo(self.endSectionNP)
self.endArrow.setPos(6, 1.5, 12.76)
self.exitElevator = self.game.assetMgr.exitElevator.copyTo(self.endSectionNP)
self.exitElevator.setPos(52, -2, 12.7)
cogSignModel = loader.loadModel('phase_4/models/props/sign_sellBotHeadHQ')
cogSign = cogSignModel.find('**/sign_sellBotHeadHQ')
cogSignSF = 23
elevatorSignSF = 15
sideDoor = self.exitElevator.find('**/doorway2')
sdSign = cogSign.copyTo(sideDoor)
sdSign.setPosHprScale(0, 1.9, 15, 0, 0, 0, elevatorSignSF, elevatorSignSF, elevatorSignSF * aspectSF)
sdSign.node().setEffect(DecalEffect.make())
sdText = DirectGui.OnscreenText(text=TTLocalizer.TwoDGameElevatorExit, font=ToontownGlobals.getSuitFont(), pos=(0, -0.34), scale=0.15, mayChange=False, parent=sdSign)
sdText.setDepthWrite(0)
self.sectionNPList.append(self.endSectionNP)
endSectionInfo = ('end',
[],
[],
[0],
[])
endSection = TwoDSection.TwoDSection(index, endSectionInfo, self.endSectionNP, self)
self.sections.append(endSection)
self.incrementX += endSection.length
示例3: loadDnaStore
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def loadDnaStore(self):
if not hasattr(self, 'dnaStore'):
self.dnaStore = DNAStorage()
files = ('phase_4/dna/storage.pdna', 'phase_3.5/dna/storage_interior.pdna')
dnaBulk = DNABulkLoader(self.dnaStore, files)
dnaBulk.loadDNAFiles()
self.dnaStore.storeFont('humanist', ToontownGlobals.getInterfaceFont())
self.dnaStore.storeFont('mickey', ToontownGlobals.getSignFont())
self.dnaStore.storeFont('suit', ToontownGlobals.getSuitFont())
示例4: __init__
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def __init__(self, cr):
DistributedObject.DistributedObject.__init__(self, cr)
Level.Level.__init__(self)
self.lastToonZone = None
self.lastCamZone = 0
self.titleColor = (1, 1, 1, 1)
self.titleText = OnscreenText.OnscreenText('', fg=self.titleColor, shadow=(0, 0, 0, 1), font=ToontownGlobals.getSuitFont(), pos=(0, -0.5), scale=0.16, drawOrder=0, mayChange=1)
self.smallTitleText = OnscreenText.OnscreenText('', fg=self.titleColor, font=ToontownGlobals.getSuitFont(), pos=(0.65, 0.9), scale=0.08, drawOrder=0, mayChange=1, bg=(0.5, 0.5, 0.5, 0.5), align=TextNode.ARight)
self.titleSeq = None
self.zonesEnteredList = []
self.fColorZones = 0
self.scenarioIndex = 0
示例5: __init__
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def __init__(self):
try:
self.Suit_initialized
return
except:
self.Suit_initialized = 1
Avatar.Avatar.__init__(self)
self.setFont(ToontownGlobals.getSuitFont())
self.nametag.setSpeechFont(ToontownGlobals.getSuitFont())
self.setPlayerType(NametagGroup.CCSuit)
self.setPickable(1)
self.leftHand = None
self.rightHand = None
self.shadowJoint = None
self.nametagJoint = None
self.headParts = []
self.healthBar = None
self.healthCondition = 0
self.isDisguised = 0
self.isWaiter = 0
self.isRental = 0
示例6: setupSuitBuilding
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def setupSuitBuilding(self, nodePath):
if nodePath.isEmpty():
return
dnaStore = self.cr.playGame.dnaStore
level = int(self.difficulty / 2) + 1
suitNP = dnaStore.findNode("suit_landmark_" + chr(self.track) + str(level))
zoneId = dnaStore.getZoneFromBlockNumber(self.block)
newParentNP = base.cr.playGame.hood.loader.zoneDict[zoneId]
suitBuildingNP = suitNP.copyTo(newParentNP)
buildingTitle = dnaStore.getTitleFromBlockNumber(self.block)
if not buildingTitle:
buildingTitle = TTLocalizer.CogsInc
else:
buildingTitle += TTLocalizer.CogsIncExt
buildingTitle += "\n%s" % SuitDNA.getDeptFullname(chr(self.track))
textNode = TextNode("sign")
textNode.setTextColor(1.0, 1.0, 1.0, 1.0)
textNode.setFont(ToontownGlobals.getSuitFont())
textNode.setAlign(TextNode.ACenter)
textNode.setWordwrap(17.0)
textNode.setText(buildingTitle)
textHeight = textNode.getHeight()
zScale = (textHeight + 2) / 3.0
signOrigin = suitBuildingNP.find("**/sign_origin;+s")
backgroundNP = loader.loadModel("phase_5/models/modules/suit_sign")
backgroundNP.reparentTo(signOrigin)
backgroundNP.setPosHprScale(0.0, 0.0, textHeight * 0.8 / zScale, 0.0, 0.0, 0.0, 8.0, 8.0, 8.0 * zScale)
signTextNodePath = backgroundNP.attachNewNode(textNode.generate())
signTextNodePath.setPosHprScale(
0.0, 0.0, -0.21 + textHeight * 0.1 / zScale, 0.0, 0.0, 0.0, 0.1, 0.1, 0.1 / zScale
)
signTextNodePath.setColor(1.0, 1.0, 1.0, 1.0)
frontNP = suitBuildingNP.find("**/*_front/+GeomNode;+s")
backgroundNP.wrtReparentTo(frontNP)
frontNP.node().setEffect(DecalEffect.make())
signTextNodePath.setAttrib(DepthOffsetAttrib.make(1))
suitBuildingNP.setName("sb" + str(self.block) + ":_landmark__DNARoot")
suitBuildingNP.setPosHprScale(nodePath, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0)
suitBuildingNP.flattenMedium()
self.loadElevator(suitBuildingNP)
return suitBuildingNP
示例7: setupCogdo
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def setupCogdo(self, nodePath):
dnaStore = self.cr.playGame.dnaStore
level = int(self.difficulty / 2) + 1
suitNP = dnaStore.findNode(FO_DICT[chr(self.track)])
if not suitNP:
suitNP = loader.loadModel("phase_5/models/cogdominium/%s" % FO_DICT[chr(self.track)])
zoneId = dnaStore.getZoneFromBlockNumber(self.block)
newParentNP = base.cr.playGame.hood.loader.zoneDict[zoneId]
suitBuildingNP = suitNP.copyTo(newParentNP)
buildingTitle = dnaStore.getTitleFromBlockNumber(self.block)
if not buildingTitle:
buildingTitle = TTLocalizer.Cogdominiums
else:
buildingTitle += TTLocalizer.CogdominiumsExt
textNode = TextNode("sign")
textNode.setTextColor(1.0, 1.0, 1.0, 1.0)
textNode.setFont(ToontownGlobals.getSuitFont())
textNode.setAlign(TextNode.ACenter)
textNode.setWordwrap(12.0)
textNode.setText(buildingTitle.decode(sys.getdefaultencoding()))
textHeight = textNode.getHeight()
zScale = (textHeight + 2) / 3.0
signOrigin = suitBuildingNP.find("**/sign_origin;+s")
backgroundNP = loader.loadModel("phase_5/models/cogdominium/field_office_sign")
backgroundNP.reparentTo(signOrigin)
backgroundNP.setPosHprScale(0.0, 0.0, -1.2 + textHeight * 0.8 / zScale, 0.0, 0.0, 0.0, 20.0, 8.0, 8.0 * zScale)
signTextNodePath = backgroundNP.attachNewNode(textNode.generate())
signTextNodePath.setPosHprScale(
0.0, 0.0, -0.13 + textHeight * 0.1 / zScale, 0.0, 0.0, 0.0, 0.1 * 8.0 / 20.0, 0.1, 0.1 / zScale
)
signTextNodePath.setColor(1.0, 1.0, 1.0, 1.0)
frontNP = suitBuildingNP.find("**/*_front")
backgroundNP.wrtReparentTo(frontNP)
signTextNodePath.setAttrib(DepthOffsetAttrib.make(1))
suitBuildingNP.setName("cb" + str(self.block) + ":_landmark__DNARoot")
suitBuildingNP.setPosHprScale(nodePath, 15.463, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0)
suitBuildingNP.setColorScale(0.6, 0.6, 0.6, 1.0)
self.loadElevator(suitBuildingNP, cogdo=True)
return suitBuildingNP
示例8: create
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def create(self):
self.background = OnscreenImage(parent=render2d, image="phase_3.5/maps/blackboardEmpty.jpg")
self.gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui')
self.shuffleUp = self.gui.find('**/tt_t_gui_mat_shuffleUp')
self.shuffleDown = self.gui.find('**/tt_t_gui_mat_shuffleDown')
self.title = DirectLabel(aspect2d, relief=None, text=TTLocalizer.LanguageSelectorTitle,
text_fg=(0, 1, 0, 1), text_scale=0.15, text_font=ToontownGlobals.getSuitFont(),
pos=(0, 0, 0.70), text_shadow=(0, 0.392, 0, 1))
self.current = DirectLabel(aspect2d, relief=None, text=TTLocalizer.LanguageSelectorCurrent % settings['language'],
text_fg=(0, 1, 0, 1), text_scale=0.09, text_font=ToontownGlobals.getSuitFont(),
pos=(0, 0, 0.55), text_shadow=(0, 0.392, 0, 1))
self.available = DirectLabel(aspect2d, relief=None, text=TTLocalizer.LanguageSelectorAvailable,
text_fg=(1, 0, 0, 1), text_scale=0.09, text_font=ToontownGlobals.getSuitFont(),
pos=(0, 0, 0), text_shadow=(0.545, 0, 0, 1))
self.english = DirectButton(aspect2d, relief=None, text='English',
text_fg=(1, 0.549, 0, 1), text_scale=0.09, text_font=ToontownGlobals.getSuitFont(),
pos=(0, 0, -0.15), text_shadow=(1, 0.27, 0, 1), command=self.switchLanguage, extraArgs=['English'])
self.french = DirectButton(aspect2d, relief=None, text='French',
text_fg=(1, 0.549, 0, 1), text_scale=0.09, text_font=ToontownGlobals.getSuitFont(),
pos=(0, 0, -0.25), text_shadow=(1, 0.27, 0, 1), command=self.switchLanguage, extraArgs=['French'])
self.portuguese = DirectButton(aspect2d, relief=None, text='Portuguese',
text_fg=(1, 0.549, 0, 1), text_scale=0.09, text_font=ToontownGlobals.getSuitFont(),
pos=(0, 0, -0.35), text_shadow=(1, 0.27, 0, 1), command=self.switchLanguage, extraArgs=['Portuguese'])
self.german = DirectButton(aspect2d, relief=None, text='German',
text_fg=(1, 0.549, 0, 1), text_scale=0.09, text_font=ToontownGlobals.getSuitFont(),
pos=(0, 0, -0.45), text_shadow=(1, 0.27, 0, 1), command=self.switchLanguage, extraArgs=['German'])
self.backButton = DirectButton(aspect2d, relief=None, image=(self.shuffleUp, self.shuffleDown),
text=TTLocalizer.LanguageSelectorBack, text_font=ToontownGlobals.getInterfaceFont(),
text_scale=0.11, text_pos=(0, -0.02), pos=(0, 0, -0.75), text_fg=(1, 1, 1, 1),
text_shadow=(0, 0, 0, 1), command=self.destroy)
示例9: begin
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def begin(self, range, label, gui, tipCategory, zoneId):
self.defaultTex = "phase_3.5/maps/loading/default.jpg"
self.defaultFont = ToontownGlobals.getInterfaceFont()
self.defaultFontColor = (0, 0, 0.5, 1)
self.zone2picture = {
ToontownGlobals.GoofySpeedway: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.ToontownCentral: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.SillyStreet: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.LoopyLane: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.PunchlinePlace: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.DonaldsDock: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.BarnacleBoulevard: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.SeaweedStreet: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.LighthouseLane: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.DaisyGardens: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.ElmStreet: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.MapleStreet: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.OakStreet: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.MinniesMelodyland: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.AltoAvenue: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.BaritoneBoulevard: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.TenorTerrace: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.TheBrrrgh: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.WalrusWay: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.SleetStreet: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.PolarPlace: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.DonaldsDreamland: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.LullabyLane: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.PajamaPlace: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.OutdoorZone: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.GolfZone: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.SellbotHQ: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.SellbotFactoryExt: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.SellbotFactoryInt: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.SellbotMegaCorpInt: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.CashbotHQ: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.LawbotHQ: "phase_3.5/maps/loading/toon.jpg",
ToontownGlobals.BossbotHQ: "phase_3.5/maps/loading/toon.jpg",
}
self.zone2font = {
# Toontown Central Loader Fonts
ToontownGlobals.GoofySpeedway: ToontownGlobals.getSignFont(),
ToontownGlobals.ToontownCentral: ToontownGlobals.getCentralFont(),
ToontownGlobals.SillyStreet: ToontownGlobals.getCentralFont(),
ToontownGlobals.LoopyLane: ToontownGlobals.getCentralFont(),
ToontownGlobals.PunchlinePlace: ToontownGlobals.getCentralFont(),
# Donalds Dock Loader Fonts
ToontownGlobals.DonaldsDock: ToontownGlobals.getDockFont(),
ToontownGlobals.BarnacleBoulevard: ToontownGlobals.getDockFont(),
ToontownGlobals.SeaweedStreet: ToontownGlobals.getDockFont(),
ToontownGlobals.LighthouseLane: ToontownGlobals.getDockFont(),
# Daisys Gardens Loader Fonts
ToontownGlobals.DaisyGardens: ToontownGlobals.getGardenFont(),
ToontownGlobals.ElmStreet: ToontownGlobals.getGardenFont(),
ToontownGlobals.MapleStreet: ToontownGlobals.getGardenFont(),
ToontownGlobals.OakStreet: ToontownGlobals.getGardenFont(),
# Minnies Melodyland Loader Fonts
ToontownGlobals.MinniesMelodyland: ToontownGlobals.getMelodyFont(),
ToontownGlobals.AltoAvenue: ToontownGlobals.getMelodyFont(),
ToontownGlobals.BaritoneBoulevard: ToontownGlobals.getMelodyFont(),
ToontownGlobals.TenorTerrace: ToontownGlobals.getMelodyFont(),
# Brghhh Loader Fonts
ToontownGlobals.TheBrrrgh: ToontownGlobals.getFrostFont(),
ToontownGlobals.WalrusWay: ToontownGlobals.getFrostFont(),
ToontownGlobals.SleetStreet: ToontownGlobals.getFrostFont(),
ToontownGlobals.PolarPlace: ToontownGlobals.getFrostFont(),
# Donalds Dreamland Loader Fonts
ToontownGlobals.DonaldsDreamland: ToontownGlobals.getDreamFont(),
ToontownGlobals.LullabyLane: ToontownGlobals.getDreamFont(),
ToontownGlobals.PajamaPlace: ToontownGlobals.getDreamFont(),
# Other Zone Fonts
ToontownGlobals.OutdoorZone: ToontownGlobals.getSignFont(),
ToontownGlobals.GolfZone: ToontownGlobals.getSignFont(),
# Cog Loader Fonts (Never edit, they are good as they currently are)
ToontownGlobals.SellbotHQ: ToontownGlobals.getSuitFont(),
ToontownGlobals.SellbotFactoryExt: ToontownGlobals.getSuitFont(),
ToontownGlobals.SellbotFactoryInt: ToontownGlobals.getSuitFont(),
ToontownGlobals.SellbotMegaCorpInt: ToontownGlobals.getSuitFont(),
ToontownGlobals.CashbotHQ: ToontownGlobals.getSuitFont(),
ToontownGlobals.LawbotHQ: ToontownGlobals.getSuitFont(),
ToontownGlobals.BossbotHQ: ToontownGlobals.getSuitFont(),
}
self.zone2fontcolor = {
ToontownGlobals.GoofySpeedway: VBase4(0.2, 0.6, 0.9, 1.0),
ToontownGlobals.ToontownCentral: VBase4(0.9803921568627451, 0.8235294117647059, 0.0392156862745098, 1.0),
ToontownGlobals.SillyStreet: VBase4(0.9803921568627451, 0.8235294117647059, 0.0392156862745098, 1.0),
ToontownGlobals.LoopyLane: VBase4(0.9803921568627451, 0.8235294117647059, 0.0392156862745098, 1.0),
ToontownGlobals.PunchlinePlace: VBase4(0.9803921568627451, 0.8235294117647059, 0.0392156862745098, 1.0),
ToontownGlobals.DonaldsDock: VBase4(0.6901960784313725, 0.4274509803921569, 0.0549019607843137, 1.0),
ToontownGlobals.BarnacleBoulevard: VBase4(0.6901960784313725, 0.4274509803921569, 0.0549019607843137, 1.0),
ToontownGlobals.SeaweedStreet: VBase4(0.6901960784313725, 0.4274509803921569, 0.0549019607843137, 1.0),
ToontownGlobals.LighthouseLane: VBase4(0.6901960784313725, 0.4274509803921569, 0.0549019607843137, 1.0),
ToontownGlobals.DaisyGardens: VBase4(0.1647058823529412, 0.7490196078431373, 0.4509803921568627, 1.0),
ToontownGlobals.ElmStreet: VBase4(0.1647058823529412, 0.7490196078431373, 0.4509803921568627, 1.0),
ToontownGlobals.MapleStreet: VBase4(0.1647058823529412, 0.7490196078431373, 0.4509803921568627, 1.0),
ToontownGlobals.OakStreet: VBase4(0.1647058823529412, 0.7490196078431373, 0.4509803921568627, 1.0),
ToontownGlobals.MinniesMelodyland: VBase4(0.9294117647058824, 0.0196078431372549, 0.7333333333333333, 1.0),
ToontownGlobals.AltoAvenue: VBase4(0.9294117647058824, 0.0196078431372549, 0.7333333333333333, 1.00),
ToontownGlobals.BaritoneBoulevard: VBase4(0.9294117647058824, 0.0196078431372549, 0.7333333333333333, 1.0),
ToontownGlobals.TenorTerrace: VBase4(0.9294117647058824, 0.0196078431372549, 0.7333333333333333, 1.0),
#.........这里部分代码省略.........
示例10: load
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def load(self):
if self.isLoaded == 1:
return None
self.isLoaded = 1
gui = loader.loadModel('phase_3/models/gui/dialog_box_buttons_gui')
guiButton = loader.loadModel('phase_3/models/gui/quit_button')
self.head = Suit.attachSuitHead(self, self.suitName)
z = self.head.getZ()
self.head.setPos(-0.4, -0.1, z + 0.14)
self.suitLabel = DirectLabel(parent=self, relief=None, text=self.suitFullName, text_font=ToontownGlobals.getSuitFont(), pos=(-0.4, 0, -0.085), scale=0.07)
closeButtonImage = (gui.find('**/CloseBtn_UP'), gui.find('**/CloseBtn_DN'), gui.find('**/CloseBtn_Rllvr'))
buttonImage = (guiButton.find('**/QuitBtn_UP'), guiButton.find('**/QuitBtn_DN'), guiButton.find('**/QuitBtn_RLVR'))
disabledColor = Vec4(0.5, 0.5, 0.5, 1)
base.cr.lmao = self
self.summonBuildingButton = DirectButton(parent=self, relief=None, text=TTLocalizer.SummonDlgButton1, image=buttonImage, image_scale=(1.7, 1, 1), image3_color=disabledColor, text_scale=0.06, text_pos=(0, -0.01), pos=(0.3, 0, 0.35), command=self.issueSummons, extraArgs=['building'])
self.summonInvasionButton = DirectButton(parent=self, relief=None, text=TTLocalizer.SummonDlgButton2, image=buttonImage, image_scale=(1.7, 1, 1), image3_color=disabledColor, text_scale=0.06, text_pos=(0, -0.01), pos=(0.3, 0, 0.225), command=self.issueSummons, extraArgs=['invasion'])
self.summonCogdoButton = DirectButton(parent=self, relief=None, text=TTLocalizer.SummonDlgButton3, image=buttonImage, image_scale=(1.7, 1, 1), image3_color=disabledColor, text_scale=0.06, text_pos=(0, -0.01), pos=(0.3, 0, 0.1), command=self.issueSummons, extraArgs=['cogdo'])
self.summonSkelInvasionButton = DirectButton(parent=self, relief=None, text=TTLocalizer.SummonDlgButton4, image=buttonImage, image_scale=(1.7, 1, 1), image3_color=disabledColor, text_scale=0.051, text_pos=(0, -0.01), pos=(0.3, 0, -0.025), command=self.issueSummons, extraArgs=['skelinvasion'])
self.summonWaiterInvasionButton = DirectButton(parent=self, relief=None, text=TTLocalizer.SummonDlgButton5, image=buttonImage, image_scale=(1.7, 1, 1), image3_color=disabledColor, text_scale=0.056, text_pos=(0, -0.01), pos=(0.3, 0, -0.15), command=self.issueSummons, extraArgs=['waiterinvasion'])
self.summonV2InvasionButton = DirectButton(parent=self, relief=None, text=TTLocalizer.SummonDlgButton6, image=buttonImage, image_scale=(1.7, 1, 1), image3_color=disabledColor, text_scale=0.048, text_pos=(0, -0.01), pos=(0.3, 0, -0.275), command=self.issueSummons, extraArgs=['v2invasion'])
self.statusLabel = DirectLabel(parent=self, relief=None, text='', text_wordwrap=12, pos=(0.3, 0, 0.3), scale=0.07)
self.cancel = DirectButton(parent=self, relief=None, image=closeButtonImage, pos=(0.7, 0, -0.366), command=self.__cancel)
gui.removeNode()
guiButton.removeNode()
self.hide()
return
示例11: setEntranceId
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def setEntranceId(self, entranceId):
self.entranceId = entranceId
geom = self.cr.playGame.hood.loader.geom
locator = geom.find('**/elevator_origin_%s' % entranceId)
if locator:
self.elevatorModel.setPosHpr(locator, 0, 0, 0, 0, 0, 0)
else:
self.notify.error('No origin found for originId: %s' % entranceId)
entranceId2zoneId = {0: ToontownGlobals.LawbotStageIntA,
1: ToontownGlobals.LawbotStageIntB,
2: ToontownGlobals.LawbotStageIntC,
3: ToontownGlobals.LawbotStageIntD}
self.intZoneId = entranceId2zoneId[entranceId]
locator = geom.find('**/elevator_signorigin_%s' % entranceId)
backgroundGeom = geom.find('**/ElevatorFrameFront_%d' % entranceId)
backgroundGeom.node().setEffect(DecalEffect.make())
signText = DirectGui.OnscreenText(text=TextEncoder.upper(TTLocalizer.GlobalStreetNames[self.intZoneId][-1]), font=ToontownGlobals.getSuitFont(), scale=2, fg=(0.87, 0.87, 0.87, 1), mayChange=False, parent=backgroundGeom)
signText.setPosHpr(locator, 0, 0, 0, 0, 0, 0)
signText.setDepthWrite(0)
示例12: __init__
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def __init__(self, cr):
DistributedObject.DistributedObject.__init__(self, cr)
self.titleColor = (1, 1, 1, 1)
self.titleText = OnscreenText.OnscreenText('', fg=self.titleColor, shadow=(0, 0, 0, 1), font=ToontownGlobals.getSuitFont(), pos=(0, -0.5), scale=0.1, drawOrder=0, mayChange=1)
self.titleSequence = None
self.pendingZoneChange = 0
return
示例13: showTitleText
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def showTitleText(self):
if self.style.dept not in TTLocalizer.BossLocations:
return Sequence()
titleText = OnscreenText.OnscreenText(TTLocalizer.BossLocations[self.style.dept], fg=(1, 1, 1, 1), shadow=(0, 0, 0, 1), font=ToontownGlobals.getSuitFont(), pos=(0, -0.5), scale=0.16, wordwrap=16)
return Sequence(Wait(5.0), titleText.colorScaleInterval(0.5, (1, 1, 1, 0)), Func(titleText.removeNode))
示例14: __init__
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def __init__(self, parent = aspect2d, **kw):
bookModel = loader.loadModel('phase_3.5/models/gui/stickerbook_gui')
circleModel = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_nameShop').find('**/tt_t_gui_mat_namePanelCircle')
questCard = bookModel.find('**/questCard')
optiondefs = (('relief', None, None),
('image', questCard, None),
('image_scale', (0.8, 1.0, 0.58), None),
('state', DGG.NORMAL, None))
self.defineoptions(kw, optiondefs)
DirectFrame.__init__(self, relief=None)
self.initialiseoptions(QuestPoster)
self._deleteCallback = None
self.questFrame = DirectFrame(parent=self, relief=None)
self.headline = DirectLabel(parent=self.questFrame, relief=None, text='', text_font=ToontownGlobals.getMinnieFont(), text_fg=self.normalTextColor, text_scale=0.05, text_align=TextNode.ACenter, text_wordwrap=12.0, textMayChange=1, pos=(0, 0, 0.23))
self.questInfo = DirectLabel(parent=self.questFrame, relief=None, text='', text_fg=self.normalTextColor, text_scale=TEXT_SCALE, text_align=TextNode.ACenter, text_wordwrap=TEXT_WORDWRAP, textMayChange=1, pos=(0, 0, -0.0625))
self.rewardText = DirectLabel(parent=self.questFrame, relief=None, text='', text_fg=self.colors['rewardRed'], text_scale=0.0425, text_align=TextNode.ALeft, text_wordwrap=17.0, textMayChange=1, pos=(-0.36, 0, -0.26))
self.rewardText.hide()
self.lPictureFrame = DirectFrame(parent=self.questFrame, relief=None, image=bookModel.find('**/questPictureFrame'), image_scale=IMAGE_SCALE_SMALL, text='', text_pos=(0, -0.11), text_fg=self.normalTextColor, text_scale=TEXT_SCALE, text_align=TextNode.ACenter, text_wordwrap=11.0, textMayChange=1)
self.lPictureFrame.hide()
self.rPictureFrame = DirectFrame(parent=self.questFrame, relief=None, image=bookModel.find('**/questPictureFrame'), image_scale=IMAGE_SCALE_SMALL, text='', text_pos=(0, -0.11), text_fg=self.normalTextColor, text_scale=TEXT_SCALE, text_align=TextNode.ACenter, text_wordwrap=11.0, textMayChange=1, pos=(0.18, 0, 0.13))
self.rPictureFrame.hide()
self.lQuestIcon = DirectFrame(parent=self.lPictureFrame, relief=None, text=' ', text_font=ToontownGlobals.getSuitFont(), text_pos=(0, -0.03), text_fg=self.normalTextColor, text_scale=0.13, text_align=TextNode.ACenter, text_wordwrap=13.0, textMayChange=1)
self.lQuestIcon.setColorOff(-1)
self.rQuestIcon = DirectFrame(parent=self.rPictureFrame, relief=None, text=' ', text_font=ToontownGlobals.getSuitFont(), text_pos=(0, -0.03), text_fg=self.normalTextColor, text_scale=0.13, text_align=TextNode.ACenter, text_wordwrap=13.0, textMayChange=1)
self.rQuestIcon.setColorOff(-1)
self.auxText = DirectLabel(parent=self.questFrame, relief=None, text='', text_scale=TTLocalizer.QPauxText, text_fg=self.normalTextColor, text_align=TextNode.ACenter, textMayChange=1)
self.auxText.hide()
self.questProgress = DirectWaitBar(parent=self.questFrame, relief=DGG.SUNKEN, frameSize=(-0.95, 0.95, -0.1, 0.12), borderWidth=(0.025, 0.025), scale=0.2, frameColor=(0.945, 0.875, 0.706, 1.0), barColor=(0.5, 0.7, 0.5, 1), text='0/0', text_scale=0.19, text_fg=(0.05, 0.14, 0.4, 1), text_align=TextNode.ACenter, text_pos=(0, -0.04), pos=(0, 0, -0.195))
self.questProgress.hide()
self.funQuest = DirectLabel(parent=self.questFrame, relief=None, text=TTLocalizer.QuestPosterFun, text_fg=(0.0, 0.439, 1.0, 1.0), text_shadow=(0, 0, 0, 1), pos=(0, 0, -0.125), scale=0.04)
self.funQuest.hide()
self.teleportButton = DirectButton(parent=self.questFrame, relief=None, image=circleModel, text="Teleport", text_scale=0.035, text_pos=(-0.0025, -0.015), pos=(0.175, 0, 0.125), scale=0.75) #, text_bg=(0, 0.75, 1, 1)
self.teleportButton.hide()
self.laffMeter = None
self.filmstrip = None
self.question = None
return
示例15: makePanels
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def makePanels(self):
self.panels = []
base.panels = []
xStart = -0.66
yStart = -0.18
xOffset = 0.199
yOffset = 0.284
for dept in xrange(0, len(SuitDNA.suitDepts)):
row = []
color = PANEL_COLORS[dept]
for type in xrange(0, SuitDNA.suitsPerDept):
panel = DirectLabel(parent=self.panelNode, pos=(xStart + type * xOffset, 0.0, yStart - dept * yOffset), relief=None, state=DGG.NORMAL, image=self.panelModel, image_scale=(1, 1, 1), image_color=color, text=TTLocalizer.SuitPageMystery, text_scale=0.045, text_fg=(0, 0, 0, 1), text_pos=(0, 0.185, 0), text_font=ToontownGlobals.getSuitFont(), text_wordwrap=7)
panel.scale = 0.6
panel.setScale(panel.scale)
panel.quotaLabel = None
panel.head = None
panel.shadow = None
panel.count = 0
panel.summonButton = None
self.addCogRadarLabel(panel)
self.panels.append(panel)
base.panels.append(panel)
return