本文整理汇总了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
示例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(
示例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)