本文整理汇总了Python中panda3d.core.WindowProperties.setCursorFilename方法的典型用法代码示例。如果您正苦于以下问题:Python WindowProperties.setCursorFilename方法的具体用法?Python WindowProperties.setCursorFilename怎么用?Python WindowProperties.setCursorFilename使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类panda3d.core.WindowProperties
的用法示例。
在下文中一共展示了WindowProperties.setCursorFilename方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setCursor
# 需要导入模块: from panda3d.core import WindowProperties [as 别名]
# 或者: from panda3d.core.WindowProperties import setCursorFilename [as 别名]
def setCursor(self):
base.win.clearRejectedProperties()
props = WindowProperties()
if sys.platform.startswith('linux'):
props.setCursorFilename("./assets/cursor.x11")
else:
props.setCursorFilename("./assets/cursor.ico")
base.win.requestProperties(props)
示例2: show_cursor
# 需要导入模块: from panda3d.core import WindowProperties [as 别名]
# 或者: from panda3d.core.WindowProperties import setCursorFilename [as 别名]
def show_cursor():
"""set the Cursor visible again"""
props = WindowProperties()
props.setCursorHidden(False)
# set the filename to the mouse cursor
x11 = "assets/gui/Cursor.x11"
win = "assets/gui/Cursor.ico"
if sys.platform.startswith("linux"):
props.setCursorFilename(x11)
else:
props.setCursorFilename(win)
base.win.requestProperties(props)
示例3: main
# 需要导入模块: from panda3d.core import WindowProperties [as 别名]
# 或者: from panda3d.core.WindowProperties import setCursorFilename [as 别名]
def main():
props = WindowProperties( )
props.setTitle( 'El Juego Loco' )
props.setCursorFilename(Filename.binaryFilename("cursor.ico"))
props.setFullscreen(0)
props.setSize(1024, 768)
game = World()
game.win.setClearColor((0, 0, 0, 1))
game.win.requestProperties( props )
game.setFrameRateMeter(True)
game.run()
示例4: main
# 需要导入模块: from panda3d.core import WindowProperties [as 别名]
# 或者: from panda3d.core.WindowProperties import setCursorFilename [as 别名]
def main():
props = WindowProperties( )
props.setTitle('Hostil Galaxy')
props.setCursorFilename(Filename.binaryFilename('cursor.ico'))
props.setCursorHidden(False)
props.setFullscreen(False)
props.setSize(800, 600)
game = World()
game.win.setClearColor((0, 0, 0, 1))
game.win.requestProperties(props)
game.setFrameRateMeter(True)
game.run()
示例5: __init__
# 需要导入模块: from panda3d.core import WindowProperties [as 别名]
# 或者: from panda3d.core.WindowProperties import setCursorFilename [as 别名]
def __init__(self):
"""initialise the engine"""
ShowBase.__init__(self)
#self.setBackgroundColor(0,0,0)
self.mainMenu = MainMenu()
self.hostMenu = HostMenu()
self.hostMenu.hide()
# set the mouse cursor
base.win.clearRejectedProperties()
props = WindowProperties()
if sys.platform.startswith('linux'):
props.setCursorFilename("Cursor.x11")
else:
props.setCursorFilename("Cursor.ico")
base.win.requestProperties(props)
## Basic events
self.acceptAll()
示例6: WindowProperties
# 需要导入模块: from panda3d.core import WindowProperties [as 别名]
# 或者: from panda3d.core.WindowProperties import setCursorFilename [as 别名]
import Globals
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