本文整理汇总了Python中panda3d.core.WindowProperties.setIconFilename方法的典型用法代码示例。如果您正苦于以下问题:Python WindowProperties.setIconFilename方法的具体用法?Python WindowProperties.setIconFilename怎么用?Python WindowProperties.setIconFilename使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类panda3d.core.WindowProperties
的用法示例。
在下文中一共展示了WindowProperties.setIconFilename方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: WindowProperties
# 需要导入模块: from panda3d.core import WindowProperties [as 别名]
# 或者: from panda3d.core.WindowProperties import setIconFilename [as 别名]
import time
import os
import tempfile
import LocalizerEnglish as Localizer
from panda3d.core import WindowProperties
print 'Gathering Data...'
#time.sleep(0.1)
print 'Loading Toontown...'
print 'DirectStart: Starting Make A Toon.'
base.disableMouse()
wp = WindowProperties()
tempdir = tempfile.mkdtemp()
wp.setTitle('Toontown Emulator')
wp.setCursorFilename('toonmono.cur')
wp.setIconFilename('icon.ico')
base.win.requestProperties( wp )
base.setAspectRatio(1.3333333334)
base.camera.hide()
base.camera.setPos(-0.30, -11, 3)
base.camera.setHpr(-3, 0, 0)
class MakeAToon:
def __init__(self):
self.notify = DirectNotifyGlobal.directNotify.newCategory("Starting Make A Toon.")
self.localAvatar = LocalAvatar.toonBody
base.localAvatar = self.localAvatar
self.toonColors = Localizer.toonColorDict
self.colorNum = 0
self.numColors = Localizer.numColors
self.MakeAToonText = Localizer.MakeAToonText
self.Mickey = Localizer.Mickey
示例2: __init__
# 需要导入模块: from panda3d.core import WindowProperties [as 别名]
# 或者: from panda3d.core.WindowProperties import setIconFilename [as 别名]
def __init__(self):
ShowBase.__init__(self)
FSM.__init__(self, "FSM-Game")
#
# BASIC APPLICATION CONFIGURATIONS
#
self.disableMouse()
self.setBackgroundColor(0, 0, 0)
self.camLens.setFov(75)
self.camLens.setNear(0.8)
# check if the config file hasn't been created
base.textWriteSpeed = 0.05
mute = ConfigVariableBool("audio-mute", False).getValue()
if mute:
self.disableAllAudio()
else:
self.enableAllAudio()
particles = ConfigVariableBool("particles-enabled", True).getValue()
if particles:
self.enableParticles()
base.textWriteSpeed = ConfigVariableDouble("text-write-speed",0.05).getValue()
base.controlType = ConfigVariableString("control-type", "Gamepad").getValue()
base.mouseSensitivity = ConfigVariableDouble("mouse-sensitivity",1.0).getValue()
if not os.path.exists(prcFile):
self.__writeConfig()
# set window properties
# clear all properties not previously set
self.win.clearRejectedProperties()
# setup new window properties
props = WindowProperties()
# Fullscreen
props.setFullscreen(True)
# window icon
print props.hasIconFilename()
props.setIconFilename(windowicon)
# get the displays width and height
w = self.pipe.getDisplayWidth()
h = self.pipe.getDisplayHeight()
# set the window size to the screen resolution
props.setSize(w, h)
# request the new properties
self.win.requestProperties(props)
atexit.register(self.__writeConfig)
# enable collision handling
base.cTrav = CollisionTraverser("base collision traverser")
base.pusher = CollisionHandlerPusher()
base.pusher.addInPattern('%fn-in-%in')
base.pusher.addOutPattern('%fn-out-%in')
self.menu = Menu()
self.options = OptionsMenu()
self.musicMenu = loader.loadMusic("MayanJingle6_Menu.ogg")
self.musicMenu.setLoop(True)
cm = CardMaker("menuFade")
cm.setFrameFullscreenQuad()
self.menuCoverFade = NodePath(cm.generate())
self.menuCoverFade.setTransparency(TransparencyAttrib.MAlpha)
self.menuCoverFade.setBin("fixed", 1000)
self.menuCoverFade.reparentTo(render2d)
self.menuCoverFade.hide()
self.menuCoverFadeOutInterval = Sequence(
Func(self.menuCoverFade.show),
LerpColorScaleInterval(
self.menuCoverFade,
1,
LVecBase4f(0.0,0.0,0.0,1.0),
LVecBase4f(0.0,0.0,0.0,0.0)),
Func(self.menuCoverFade.hide))
self.menuCoverFadeInInterval = Sequence(
Func(self.menuCoverFade.show),
LerpColorScaleInterval(
self.menuCoverFade,
1,
LVecBase4f(0.0,0.0,0.0,0.0),
LVecBase4f(0.0,0.0,0.0,1.0)),
Func(self.menuCoverFade.hide))
self.lerpAudioFadeOut = LerpFunc(
self.audioFade,
fromData=1.0,
toData=0.0,
duration=0.25,
extraArgs=[self.musicMenu])
self.fadeMusicOut = Sequence(
self.lerpAudioFadeOut,
Func(self.musicMenu.stop))
self.lerpAudioFadeIn = LerpFunc(
self.audioFade,
fromData=0.0,
toData=1.0,
duration=1,
extraArgs=[self.musicMenu])
self.fadeMusicIn = Sequence(
Func(self.musicMenu.play),
self.lerpAudioFadeIn)
#.........这里部分代码省略.........