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


Python ToontownGlobals.getInterfaceFont方法代码示例

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


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

示例1: setupButtons

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
    def setupButtons(self):
        gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui')
        arrowImage = (gui.find('**/tt_t_gui_mat_shuffleArrowUp'), gui.find('**/tt_t_gui_mat_shuffleArrowDown'))
        buttonImage = (gui.find('**/tt_t_gui_mat_shuffleUp'), gui.find('**/tt_t_gui_mat_shuffleDown'))

        self.title = DirectLabel(aspect2d, relief=None, text=TTLocalizer.GloveGuiTitle,
                     text_fg=(0, 1, 0, 1), text_scale=0.15, text_font=ToontownGlobals.getSignFont(),
                     pos=(0, 0, -0.30), text_shadow=(1, 1, 1, 1))

        self.notice = DirectLabel(aspect2d, relief=None, text='', text_fg=(1, 0, 0, 1), text_scale=0.11,
                      text_font=ToontownGlobals.getSignFont(), pos=(0, 0, -0.45), text_shadow=(1, 1, 1, 1))

        self.color = DirectLabel(aspect2d, relief=None, text='', text_scale=0.11, text_font=ToontownGlobals.getSignFont(),
                     pos=(0, 0, -0.70), text_shadow=(1, 1, 1, 1))

        self.buyButton = DirectButton(aspect2d, relief=None, image=buttonImage, text=TTLocalizer.GloveGuiBuy,
                         text_font=ToontownGlobals.getInterfaceFont(), text_scale=0.11, text_pos=(0, -0.02),
                         pos=(-0.60, 0, -0.90), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), command=self.__exit, extraArgs=[GloveNPCGlobals.CHANGE])

        self.cancelButton = DirectButton(aspect2d, relief=None, image=buttonImage, text=TTLocalizer.lCancel,
                            text_font=ToontownGlobals.getInterfaceFont(), text_scale=0.11, text_pos=(0, -0.02),
                            pos=(0.60, 0, -0.90), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), command=self.__exit, extraArgs=[GloveNPCGlobals.USER_CANCEL])

        self.downArrow = DirectButton(aspect2d, relief=None, image=arrowImage, pos=(-0.60, 0, -0.66))
        self.upArrow = DirectButton(aspect2d, relief=None, image=arrowImage, pos=(0.60, 0, -0.66), scale=-1)

        gui.removeNode()
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:29,代码来源:GloveShopGui.py

示例2: load

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
 def load(self):
     gui = loader.loadModel("phase_3/models/gui/laff_o_meter")
     if self.isToon:
         hType = self.style.getType()
         if hType == "dog":
             headModel = gui.find("**/doghead")
         elif hType == "cat":
             headModel = gui.find("**/cathead")
         elif hType == "mouse":
             headModel = gui.find("**/mousehead")
         elif hType == "horse":
             headModel = gui.find("**/horsehead")
         elif hType == "rabbit":
             headModel = gui.find("**/bunnyhead")
         elif hType == "duck":
             headModel = gui.find("**/duckhead")
         elif hType == "monkey":
             headModel = gui.find("**/monkeyhead")
         elif hType == "bear":
             headModel = gui.find("**/bearhead")
         elif hType == "pig":
             headModel = gui.find("**/pighead")
         else:
             raise StandardError("unknown toon species: ", hType)
         self.color = self.style.getHeadColor()
         self.container["image"] = headModel
         self.container["image_color"] = self.color
         self.resetFrameSize()
         self.setScale(0.1)
         self.frown = DirectFrame(parent=self.container, relief=None, image=gui.find("**/frown"))
         self.smile = DirectFrame(parent=self.container, relief=None, image=gui.find("**/smile"))
         self.eyes = DirectFrame(parent=self.container, relief=None, image=gui.find("**/eyes"))
         self.openSmile = DirectFrame(parent=self.container, relief=None, image=gui.find("**/open_smile"))
         self.tooth1 = DirectFrame(parent=self.openSmile, relief=None, image=gui.find("**/tooth_1"))
         self.tooth2 = DirectFrame(parent=self.openSmile, relief=None, image=gui.find("**/tooth_2"))
         self.tooth3 = DirectFrame(parent=self.openSmile, relief=None, image=gui.find("**/tooth_3"))
         self.tooth4 = DirectFrame(parent=self.openSmile, relief=None, image=gui.find("**/tooth_4"))
         self.tooth5 = DirectFrame(parent=self.openSmile, relief=None, image=gui.find("**/tooth_5"))
         self.tooth6 = DirectFrame(parent=self.openSmile, relief=None, image=gui.find("**/tooth_6"))
         self.maxLabel = DirectLabel(
             parent=self.eyes,
             relief=None,
             pos=(0.442, 0, 0.051),
             text="120",
             text_scale=0.4,
             text_font=ToontownGlobals.getInterfaceFont(),
         )
         self.hpLabel = DirectLabel(
             parent=self.eyes,
             relief=None,
             pos=(-0.398, 0, 0.051),
             text="120",
             text_scale=0.4,
             text_font=ToontownGlobals.getInterfaceFont(),
         )
         self.teeth = [self.tooth6, self.tooth5, self.tooth4, self.tooth3, self.tooth2, self.tooth1]
         self.fractions = [0.0, 0.166666, 0.333333, 0.5, 0.666666, 0.833333]
     gui.removeNode()
     return
开发者ID:Wesley1000070,项目名称:Toontown-Crystal,代码行数:61,代码来源:LaffMeter.py

示例3: __init__

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
 def __init__(self, genus = None, itemIndex = 0, *extraArgs):
     fishingGui = loader.loadModel('phase_3.5/models/gui/fishingBook')
     albumGui = fishingGui.find('**/photo_frame1').copyTo(hidden)
     albumGui.find('**/picture_frame').reparentTo(albumGui, -1)
     albumGui.find('**/arrows').removeNode()
     optiondefs = (('relief', None, None),
      ('state', DGG.NORMAL, None),
      ('image', albumGui, None),
      ('image_scale', (0.025, 0.025, 0.025), None),
      ('image_pos', (0, 1, 0), None),
      ('text', TTLocalizer.UnknownFish, None),
      ('text_scale', 0.065, None),
      ('text_fg', (0.2, 0.1, 0.0, 1), None),
      ('text_pos', (-0.5, -0.34), None),
      ('text_font', ToontownGlobals.getInterfaceFont(), None),
      ('text_wordwrap', 13.5, None),
      ('text_align', TextNode.ALeft, None))
     self.defineoptions({}, optiondefs)
     DirectFrame.__init__(self)
     self.initialiseoptions(GenusPanel)
     self.fishPanel = None
     self.genus = None
     self.setGenus(int(genus))
     self.setScale(1.2)
     albumGui.removeNode()
     return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:28,代码来源:GenusPanel.py

示例4: load

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
 def load(self):
     gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui')
     shuffleFrame = gui.find('**/tt_t_gui_mat_shuffleFrame')
     shuffleUp = gui.find('**/tt_t_gui_mat_shuffleUp')
     shuffleDown = gui.find('**/tt_t_gui_mat_shuffleDown')
     shuffleArrowUp = gui.find('**/tt_t_gui_mat_shuffleArrowUp')
     shuffleArrowDown = gui.find('**/tt_t_gui_mat_shuffleArrowDown')
     shuffleArrowDisabled = gui.find('**/tt_t_gui_mat_shuffleArrowDisabled')
     gui.removeNode()
     del gui
     self.parentFrame = DirectFrame(parent=self.parent.parentFrame, relief=DGG.RAISED, pos=(0, 0, -1), frameColor=(1, 0, 0, 0))
     self.shuffleFrame = DirectFrame(parent=self.parentFrame, image=shuffleFrame, image_scale=halfButtonInvertScale, relief=None, frameColor=(1, 1, 1, 1))
     self.shuffleFrame.hide()
     self.shuffleBtn = DirectButton(parent=self.parentFrame, relief=None, image=(shuffleUp, shuffleDown, shuffleUp), image_scale=halfButtonInvertScale, image1_scale=(-0.63, 0.6, 0.6), image2_scale=(-0.63, 0.6, 0.6), text=(TTLocalizer.ShuffleButton,
      TTLocalizer.ShuffleButton,
      TTLocalizer.ShuffleButton,
      ''), text_font=ToontownGlobals.getInterfaceFont(), text_scale=TTLocalizer.SBshuffleBtn, text_pos=(0, -0.02), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), command=self.chooseRandom)
     self.incBtn = DirectButton(parent=self.parentFrame, relief=None, image=(shuffleArrowUp,
      shuffleArrowDown,
      shuffleArrowUp,
      shuffleArrowDisabled), image_scale=halfButtonInvertScale, image1_scale=halfButtonInvertHoverScale, image2_scale=halfButtonInvertHoverScale, pos=(0.202, 0, 0), command=self.__goFrontHistory)
     self.incBtn.hide()
     self.decBtn = DirectButton(parent=self.parentFrame, relief=None, image=(shuffleArrowUp,
      shuffleArrowDown,
      shuffleArrowUp,
      shuffleArrowDisabled), image_scale=halfButtonScale, image1_scale=halfButtonHoverScale, image2_scale=halfButtonHoverScale, pos=(-0.202, 0, 0), command=self.__goBackHistory)
     self.decBtn.hide()
     self.lerpDuration = 0.5
     self.showLerp = None
     self.frameShowLerp = LerpColorInterval(self.shuffleFrame, self.lerpDuration, Vec4(1, 1, 1, 1), Vec4(1, 1, 1, 0))
     self.incBtnShowLerp = LerpColorInterval(self.incBtn, self.lerpDuration, Vec4(1, 1, 1, 1), Vec4(1, 1, 1, 0))
     self.decBtnShowLerp = LerpColorInterval(self.decBtn, self.lerpDuration, Vec4(1, 1, 1, 1), Vec4(1, 1, 1, 0))
     self.__updateArrows()
     return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:36,代码来源:ShuffleButton.py

示例5: __makeGallery

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
    def __makeGallery(self):
        self.gallery = hidden.attachNewNode('gallery')
        self.gallery.setDepthWrite(1)
        self.gallery.setDepthTest(1)
        self.suits = []
        self.actors = []
        self.text = TextNode('rogues')
        self.text.setFont(ToontownGlobals.getInterfaceFont())
        self.text.setAlign(TextNode.ACenter)
        self.text.setTextColor(0.0, 0.0, 0.0, 1.0)
        self.rowHeight = 0.0
        self.minXScale = None
        print "rognamestr='", self.rognamestr, "'\n"
        if self.rognamestr == None or len(self.rognamestr) == 0:
            for dept in SuitDNA.suitDepts:
                self.__makeDept(dept)

        else:
            self.suitRow = []
            self.rowWidth = 0.0
            self.__makeSuit(None, None, self.rognamestr)
            self.minXScale = self.xRowSpace / self.rowWidth
            self.suits.append((self.rowWidth, self.suitRow))
            del self.suitRow
        self.__rescaleSuits()
        return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:28,代码来源:RoguesGallery.py

示例6: load

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
 def load(self):
     gui = loader.loadModel("phase_3/models/gui/tt_m_gui_mat_mainGui")
     guiBoyUp = gui.find("**/tt_t_gui_mat_boyUp")
     guiBoyDown = gui.find("**/tt_t_gui_mat_boyDown")
     guiGirlUp = gui.find("**/tt_t_gui_mat_girlUp")
     guiGirlDown = gui.find("**/tt_t_gui_mat_girlDown")
     self.boyButton = DirectButton(
         relief=None,
         image=(guiBoyUp, guiBoyDown, guiBoyUp, guiBoyDown),
         image_scale=halfButtonScale,
         image1_scale=halfButtonHoverScale,
         image2_scale=halfButtonHoverScale,
         pos=(-0.4, 0, -0.8),
         command=self.createRandomBoy,
         text=("", TTLocalizer.GenderShopBoyButtonText, TTLocalizer.GenderShopBoyButtonText, ""),
         text_font=ToontownGlobals.getInterfaceFont(),
         text_scale=0.08,
         text_pos=(0, 0.19),
         text_fg=(1, 1, 1, 1),
         text_shadow=(0, 0, 0, 1),
     )
     self.boyButton.hide()
     self.boyButton.setPos(-0.45, 0, 0.19)
     self.boyButton.reparentTo(base.a2dBottomCenter)
     self.girlButton = DirectButton(
         relief=None,
         image=(guiGirlUp, guiGirlDown, guiGirlUp, guiGirlDown),
         image_scale=halfButtonScale,
         image1_scale=halfButtonHoverScale,
         image2_scale=halfButtonHoverScale,
         pos=(0.4, 0, -0.8),
         command=self.createRandomGirl,
         text=("", TTLocalizer.GenderShopGirlButtonText, TTLocalizer.GenderShopGirlButtonText, ""),
         text_font=ToontownGlobals.getInterfaceFont(),
         text_scale=0.08,
         text_pos=(0, 0.19),
         text_fg=(1, 1, 1, 1),
         text_shadow=(0, 0, 0, 1),
     )
     self.girlButton.hide()
     self.girlButton.setPos(0.45, 0, 0.19)
     self.girlButton.reparentTo(base.a2dBottomCenter)
     gui.removeNode()
     del gui
     self.toon = None
     return
开发者ID:Wesley1000070,项目名称:Toontown-Crystal,代码行数:48,代码来源:GenderShop.py

示例7: loadDnaStore

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getInterfaceFont [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())
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:11,代码来源:PlayGame.py

示例8: load

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
 def load(self):
     self.picture = DirectButton(parent=self, image=(DGG.getDefaultDialogGeom(), DGG.getDefaultDialogGeom(), DGG.getDefaultDialogGeom()), relief=None, command=self.__launchFirework, extraArgs=[self.type], image_color=(0.8, 0.9, 1, 1))
     self.picture.setScale(0.2)
     self.picture.setPos(0, 0, 0)
     self.picture.initialiseoptions(self.picture)
     panelWidth = 7
     nameFont = ToontownGlobals.getInterfaceFont()
     self.quantityLabel = DirectLabel(parent=self.picture, relief=None, pos=(0, 0, 0.0), scale=0.45, text=self.name, text_scale=0.6, text_fg=(0, 0, 0, 1), text_pos=(0, -.14, 0), text_font=nameFont, text_wordwrap=panelWidth)
     return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:11,代码来源:FireworkItemPanel.py

示例9: setClarabelleChat

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
    def setClarabelleChat(self, str, timeout = 6, type = None):
        self.clearClarabelleChat()

        if not self.clarabelleChatBalloon:
            self.clarabelleChatBalloon = loader.loadModel('phase_3/models/props/chatbox')

        self.clarabelleChat = ChatBalloon(self.clarabelleChatBalloon)
        chatNode = self.clarabelleChat.generate(str, ToontownGlobals.getInterfaceFont())[0]
        self.clarabelleChatNP = self.attachNewNode(chatNode.node(), 1000)
        self.clarabelleChatNP.setScale(0.08)
        self.clarabelleChatNP.setPos(0.7, 0, 0.6)

        if timeout:
            taskMgr.doMethodLater(timeout, self.clearClarabelleChat, 'clearClarabelleChat')
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:16,代码来源:CatalogScreen.py

示例10: _initModel

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
    def _initModel(self):
        self.setPos(Globals.Gui.FuelPos2D[0], 0.0, Globals.Gui.FuelPos2D[1])
        self.gui = CogdoUtil.loadFlyingModel('propellerMeter', group='gui')
        self.gui.reparentTo(self)
        self.gui.setBin('fixed', 0)
        self.healthBar = self.gui.find('**/healthBar')
        self.healthBar.setBin('fixed', 1)
        self.healthBar.setColor(*Globals.Gui.FuelNormalColor)
        bottomBarLocator = self.gui.find('**/bottomOfBar_loc')
        bottomBarPos = bottomBarLocator.getPos(render)
        topBarLocator = self.gui.find('**/topOfBar_loc')
        topBarPos = topBarLocator.getPos(render)
        zDist = topBarPos.getZ() - bottomBarPos.getZ()
        self.fuelLowIndicator = self.gui.find('**/fuelLowIndicator')
        self.fuelLowIndicator.setBin('fixed', 2)
        pos = self.fuelLowIndicator.getPos(render)
        newPos = pos
        newPos.setZ(bottomBarPos.getZ() + zDist * Globals.Gameplay.FuelLowAmt)
        self.fuelLowIndicator.setPos(render, newPos)
        self.fuelVeryLowIndicator = self.gui.find('**/fuelVeryLowIndicator')
        self.fuelVeryLowIndicator.setBin('fixed', 2)
        pos = self.fuelVeryLowIndicator.getPos(render)
        newPos = pos
        newPos.setZ(bottomBarPos.getZ() + zDist * Globals.Gameplay.FuelVeryLowAmt)
        self.fuelVeryLowIndicator.setPos(render, newPos)
        self.propellerMain = self.gui.find('**/propellers')
        self.propellerMain.setBin('fixed', 3)
        self.propellerHead = self.gui.find('**/propellerHead')
        self.propellerHead.setBin('fixed', 4)
        self.blades = []
        self.activeBlades = []
        index = 1
        blade = self.propellerMain.find('**/propeller%d' % index)
        while not blade.isEmpty():
            self.blades.append(blade)
            index += 1
            blade = self.propellerMain.find('**/propeller%d' % index)

        for blade in self.blades:
            self.activeBlades.append(blade)

        self.bladeNumberLabel = DirectLabel(parent=self.propellerHead, relief=None, pos=(Globals.Gui.FuelNumBladesPos2D[0], 0, Globals.Gui.FuelNumBladesPos2D[1]), scale=Globals.Gui.FuelNumBladesScale, text=str(len(self.activeBlades)), text_align=TextNode.ACenter, text_fg=(0.0,
         0.0,
         -0.002,
         1), text_shadow=(0.75, 0.75, 0.75, 1), text_font=ToontownGlobals.getInterfaceFont())
        self.bladeNumberLabel.setBin('fixed', 5)
        return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:49,代码来源:CogdoFlyingGameGuis.py

示例11: __init__

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
 def __init__(self, trackId, callback):
     DirectFrame.__init__(self, relief=None)
     self.initialiseoptions(TrackPoster)
     bookModel = loader.loadModel('phase_3.5/models/gui/stickerbook_gui')
     trackName = ToontownBattleGlobals.Tracks[trackId].capitalize()
     self.poster = DirectFrame(parent=self, relief=None, image=bookModel.find('**/questCard'), image_scale=(0.4, 0.29, 0.29))
     invModel = loader.loadModel('phase_3.5/models/gui/inventory_icons')
     iconGeom = invModel.find('**/' + ToontownBattleGlobals.AvPropsNew[trackId][5])
     invModel.removeNode()
     self.pictureFrame = DirectFrame(parent=self.poster, relief=None, image=bookModel.find('**/questPictureFrame'), image_scale=0.125,
         image_color=(0.45, 0.8, 0.45, 1), text=trackName, text_font=ToontownGlobals.getInterfaceFont(), text_pos=(0, -0.14), 
         text_fg=self.normalTextColor, text_scale=0.05, text_align=TextNode.ACenter, text_wordwrap=8.0, textMayChange=0, geom=iconGeom, geom_scale=(0.8, 0.8, 0.8), pos=(0.0, 0, 0.05))
     bookModel.removeNode()
     guiButton = loader.loadModel('phase_3/models/gui/quit_button')
     self.chooseButton = DirectButton(parent=self.poster, relief=None, image=(guiButton.find('**/QuitBtn_UP'), guiButton.find('**/QuitBtn_DN'), guiButton.find('**/QuitBtn_RLVR')), 
         image_scale=(0.7, 1, 1), text=TTLocalizer.TrackChoiceGuiChoose, text_scale=0.06, text_pos=(0, -0.02), command=callback, extraArgs=[trackId], pos=(0, 0, -0.20), scale=0.8)
     guiButton.removeNode()
     return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:20,代码来源:MultiTrackChoiceGui.py

示例12: __init__

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
 def __init__(self):
     self.__expectedCount = 0
     self.__count = 0
     self.gui = loader.loadModel("phase_3/models/gui/progress-background.bam")
     self.title = DirectLabel(
         guiId="ToontownLoadingScreenTitle",
         parent=self.gui,
         relief=None,
         pos=(base.a2dRight / 5, 0, 0.235),
         text="",
         textMayChange=1,
         text_scale=0.08,
         text_fg=(0, 0, 0.5, 1),
         text_align=TextNode.ALeft,
         text_font=ToontownGlobals.getInterfaceFont(),
     )
     self.tip = DirectLabel(
         guiId="ToontownLoadingScreenTip",
         parent=self.gui,
         relief=None,
         pos=(0, 0, 0.045),
         text="",
         textMayChange=1,
         text_scale=0.05,
         text_fg=(1, 1, 1, 1),
         text_shadow=(0, 0, 0, 1),
         text_align=TextNode.ACenter,
     )
     self.waitBar = DirectWaitBar(
         guiId="ToontownLoadingScreenWaitBar",
         parent=self.gui,
         frameSize=(base.a2dLeft + (base.a2dRight / 4.95), base.a2dRight - (base.a2dRight / 4.95), -0.03, 0.03),
         pos=(0, 0, 0.15),
         text="",
     )
     logoScale = 0.5625  # Scale for our locked aspect ratio (2:1).
     self.logo = OnscreenImage(image="phase_3/maps/toontown-logo.png", scale=(logoScale * 2.0, 1, logoScale))
     self.logo.reparentTo(hidden)
     self.logo.setTransparency(TransparencyAttrib.MAlpha)
     scale = self.logo.getScale()
     self.logo.setPos(0, 0, -scale[2])
     self.toon = None
开发者ID:Wesley1000070,项目名称:Toontown-Crystal,代码行数:44,代码来源:ToontownLoadingScreen.py

示例13: __init__

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
 def __init__(self, fish = None, parent = aspect2d, doneEvent = None, **kw):
     optiondefs = (('relief', None, None),
      ('state', DGG.DISABLED, None),
      ('image', DGG.getDefaultDialogGeom(), None),
      ('image_color', ToontownGlobals.GlobalDialogColor, None),
      ('image_scale', (0.65, 1, 0.85), None),
      ('text', '', None),
      ('text_scale', 0.06, None),
      ('text_fg', (0, 0, 0, 1), None),
      ('text_pos', (0, 0.35, 0), None),
      ('text_font', ToontownGlobals.getInterfaceFont(), None),
      ('text_wordwrap', 13.5, None))
     self.defineoptions(kw, optiondefs)
     DirectFrame.__init__(self, parent)
     self.initialiseoptions(FishPanel)
     self.doneEvent = doneEvent
     self.fish = fish
     self.parent = parent
     self.photo = None
     return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:22,代码来源:FishPanel.py

示例14: __init__

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
    def __init__(self, species = None, itemIndex = 0, *extraArgs):
        flowerGui = loader.loadModel('phase_3.5/models/gui/fishingBook')
        albumGui = flowerGui.find('**/photo_frame1')
        pictureGroup = albumGui.attachNewNode('PictureGroup')
        hideList = ['corner_backs',
         'shadow',
         'bg',
         'corners',
         'picture']
        for name in hideList:
            temp = flowerGui.find('**/%s' % name)
            if not temp.isEmpty():
                temp.wrtReparentTo(pictureGroup)

        pictureGroup.setPos(0, 0, 1.0)
        albumGui.find('**/arrows').removeNode()
        optiondefs = (('relief', None, None),
         ('state', DGG.NORMAL, None),
         ('image', albumGui, None),
         ('image_scale', (0.025, 0.025, 0.025), None),
         ('image_pos', (0, 1, 0), None),
         ('text', TTLocalizer.FlowerUnknown, None),
         ('text_scale', 0.065, None),
         ('text_fg', (0.2, 0.1, 0.0, 1), None),
         ('text_pos', (-0.5, -0.34), None),
         ('text_font', ToontownGlobals.getInterfaceFont(), None),
         ('text_wordwrap', 13.5, None),
         ('text_align', TextNode.ALeft, None))
        self.defineoptions({}, optiondefs)
        DirectFrame.__init__(self)
        self.initialiseoptions(FlowerSpeciesPanel)
        self.flowerPanel = None
        self.species = None
        self.variety = 0
        self.flowerCollection = extraArgs[0]
        self.setSpecies(int(species))
        self.setScale(1.2)
        albumGui.removeNode()
        self.beanRecipeGui = None
        return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:42,代码来源:FlowerSpeciesPanel.py

示例15: create

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getInterfaceFont [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)
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:40,代码来源:LanguageSelector.py


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