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


Python DirectGuiGlobals.setDefaultFontFunc方法代码示例

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


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

示例1: PiratesOnlineLauncher

# 需要导入模块: from direct.gui import DirectGuiGlobals [as 别名]
# 或者: from direct.gui.DirectGuiGlobals import setDefaultFontFunc [as 别名]
import sys
import random
import __builtin__
import gc
gc.disable()

try:
    launcher
except:
    from pirates.launcher.PiratesOnlineLauncher import PiratesOnlineLauncher
    launcher = PiratesOnlineLauncher()
    __builtin__.launcher = launcher

from direct.gui import DirectGuiGlobals
import PiratesGlobals
DirectGuiGlobals.setDefaultFontFunc(PiratesGlobals.getInterfaceFont)
launcher.setPandaErrorCode(7)
import PiratesBase
PiratesBase.PiratesBase()
from direct.showbase.ShowBaseGlobal import *
if base.config.GetBool('want-preloader', 0):
    base.preloader = PiratesPreloader.PiratesPreloader()

if base.win == None:
    print 'Unable to open window; aborting.'
    sys.exit()

launcher.setPandaErrorCode(0)
launcher.setPandaWindowOpen()
base.sfxPlayer.setCutoffDistance(500.0)
from pirates.audio import SoundGlobals
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:33,代码来源:PiratesStart.py

示例2: HTTPClient

# 需要导入模块: from direct.gui import DirectGuiGlobals [as 别名]
# 或者: from direct.gui.DirectGuiGlobals import setDefaultFontFunc [as 别名]
    __builtin__.launcher = launcher
notify.info("Loading Clients")


notify.info('Starting Toontown Planet...')
if launcher.isDummy():
    http = HTTPClient()
else:
    http = launcher.http
tempLoader = Loader()
backgroundNode = tempLoader.loadSync(Filename('phase_3/models/gui/loading-background'))
from direct.gui import DirectGuiGlobals
from direct.gui.DirectGui import *
notify.info('Setting the default Toontown Planet font...')
import ToontownGlobals
DirectGuiGlobals.setDefaultFontFunc(ToontownGlobals.getInterfaceFont)
launcher.setPandaErrorCode(7)
import ToonBase
ToonBase.ToonBase()
from pandac.PandaModules import *
if base.win is None:
    notify.error('Unable to open window; aborting.')
launcher.setPandaErrorCode(0)
launcher.setPandaWindowOpen()
ConfigVariableDouble('decompressor-step-time').setValue(0.01)
ConfigVariableDouble('extractor-step-time').setValue(0.01)
backgroundNodePath = aspect2d.attachNewNode(backgroundNode, 0)
backgroundNodePath.setPos(0.0, 0.0, 0.0)
backgroundNodePath.setScale(render2d, VBase3(1))
backgroundNodePath.find('**/fg').hide()
logo = OnscreenImage(
开发者ID:Teku16,项目名称:ToontownPlanet,代码行数:33,代码来源:ToontownPlanetStart.py

示例3: ConfigVariableDouble

# 需要导入模块: from direct.gui import DirectGuiGlobals [as 别名]
# 或者: from direct.gui.DirectGuiGlobals import setDefaultFontFunc [as 别名]
base.transitions.IrisModelName = "phase_3/models/misc/iris.bam"
base.transitions.FadeModelName = "phase_3/models/misc/fade.bam"
base.setFrameRateMeter(False)
base.accept("f9", base.screenshot, ["screenshots/screenshot"])
from direct.filter.CommonFilters import CommonFilters

print "CIStart: Setting display preferences..."
sm.applySettings(jsonfile)
if base.win == None:
    print "CIStart: Unable to open window; aborting."
    sys.exit()
else:
    print "CIStart: Successfully opened window."
ConfigVariableDouble("decompressor-step-time").setValue(0.01)
ConfigVariableDouble("extractor-step-time").setValue(0.01)
DirectGuiGlobals.setDefaultFontFunc(CIGlobals.getToonFont)
DirectGuiGlobals.setDefaultFont(CIGlobals.getToonFont())
DirectGuiGlobals.setDefaultRolloverSound(loader.loadSfx("phase_3/audio/sfx/GUI_rollover.mp3"))
DirectGuiGlobals.setDefaultClickSound(loader.loadSfx("phase_3/audio/sfx/GUI_create_toon_fwd.mp3"))
DirectGuiGlobals.setDefaultDialogGeom(loader.loadModel("phase_3/models/gui/dialog_box_gui.bam"))


def maybeDoSomethingWithMusic(condition):
    width, height, fs, music, sfx, tex_detail, model_detail, aa, af = sm.getSettings(jsonfile)
    if condition == 0:
        if music == True:
            base.enableMusic(False)
    elif condition == 1:
        if music == True:
            base.enableMusic(True)
开发者ID:coginvasion,项目名称:src,代码行数:32,代码来源:CIStart.py


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