本文整理汇总了Python中panda3d.core.TextNode.setShadow方法的典型用法代码示例。如果您正苦于以下问题:Python TextNode.setShadow方法的具体用法?Python TextNode.setShadow怎么用?Python TextNode.setShadow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类panda3d.core.TextNode
的用法示例。
在下文中一共展示了TextNode.setShadow方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: attachHostNameToSign
# 需要导入模块: from panda3d.core import TextNode [as 别名]
# 或者: from panda3d.core.TextNode import setShadow [as 别名]
def attachHostNameToSign(self, locator):
if self.hostName == '':
return
nameText = TextNode('nameText')
nameText.setCardAsMargin(0.1, 0.1, 0.1, 0.1)
nameText.setCardDecal(True)
nameText.setCardColor(1.0, 1.0, 1.0, 0.0)
r = 232.0 / 255.0
g = 169.0 / 255.0
b = 23.0 / 255.0
nameText.setTextColor(r, g, b, 1)
nameText.setAlign(nameText.ACenter)
nameText.setFont(ToontownGlobals.getBuildingNametagFont())
nameText.setShadowColor(0, 0, 0, 1)
nameText.setBin('fixed')
if TTLocalizer.BuildingNametagShadow:
nameText.setShadow(*TTLocalizer.BuildingNametagShadow)
nameWordWrap = 11.0
nameText.setWordwrap(nameWordWrap)
scaleMult = 0.48
houseName = self.hostName
nameText.setText(houseName)
textWidth = nameText.getWidth()
xScale = 1.0 * scaleMult
if textWidth > nameWordWrap:
xScale = nameWordWrap / textWidth * scaleMult
sign_origin = locator
namePlate = sign_origin.attachNewNode(nameText)
namePlate.setDepthWrite(0)
namePlate.setPos(0, 0, 0)
namePlate.setScale(xScale)
示例2: loadGUI
# 需要导入模块: from panda3d.core import TextNode [as 别名]
# 或者: from panda3d.core.TextNode import setShadow [as 别名]
def loadGUI(self):
self.gui = loader.loadModel('phase_13/models/parties/trampolineGUI')
self.gui.reparentTo(base.a2dTopLeft)
self.gui.setPos(0.115, 0, -1)
self.gui.hide()
self.toonIndicator = self.gui.find('**/trampolineGUI_MovingBar')
jumpLineLocator = self.gui.find('**/jumpLine_locator')
guiBean = self.gui.find('**/trampolineGUI_GreenJellyBean')
self.gui.find('**/trampolineGUI_GreenJellyBean').stash()
self.guiBeans = [ guiBean.instanceUnderNode(jumpLineLocator, self.uniqueName('guiBean%d' % i)) for i in xrange(self.numJellyBeans) ]
self.guiBeans[-1].setScale(1.5)
heightTextNode = TextNode(self.uniqueName('TrampolineActivity.heightTextNode'))
heightTextNode.setFont(ToontownGlobals.getSignFont())
heightTextNode.setAlign(TextNode.ALeft)
heightTextNode.setText('0.0')
heightTextNode.setShadow(0.05, 0.05)
heightTextNode.setShadowColor(0.0, 0.0, 0.0, 1.0)
heightTextNode.setTextColor(1.0, 1.0, 1.0, 1.0)
self.heightText = jumpLineLocator.attachNewNode(heightTextNode)
self.heightText.setX(0.15)
self.heightText.setScale(0.1)
self.heightText.setAlphaScale(0.0)
self.quitEarlyButtonModels = loader.loadModel('phase_3.5/models/gui/inventory_gui')
quitEarlyUp = self.quitEarlyButtonModels.find('**//InventoryButtonUp')
quitEarlyDown = self.quitEarlyButtonModels.find('**/InventoryButtonDown')
quitEarlyRollover = self.quitEarlyButtonModels.find('**/InventoryButtonRollover')
self.quitEarlyButton = DirectButton(parent=base.a2dTopRight, relief=None, text=TTLocalizer.PartyTrampolineQuitEarlyButton, text_fg=(1, 1, 0.65, 1), text_pos=(0, -0.23), text_scale=0.7, image=(quitEarlyUp, quitEarlyDown, quitEarlyRollover), image_color=(1, 0, 0, 1), image_scale=(20, 1, 11), pos=(-0.183, 0, -0.4), scale=0.09, command=self.leaveTrampoline)
self.quitEarlyButton.stash()
self.flashText = OnscreenText(text='', pos=(0.0, -0.45), scale=0.2, fg=(1.0, 1.0, 0.65, 1.0), align=TextNode.ACenter, font=ToontownGlobals.getSignFont(), mayChange=True)
self.timer = PartyUtils.getNewToontownTimer()
self.timer.posInTopRightCorner()
return
示例3: setupLevelDisplay
# 需要导入模块: from panda3d.core import TextNode [as 别名]
# 或者: from panda3d.core.TextNode import setShadow [as 别名]
def setupLevelDisplay(self):
LEVEL_1 = "Level 1"
levelDisplay(LEVEL_1)
levelN = TextNode('level-display')
levelN.setText(LEVEL_1)
font = loader.loadFont("font/Caveman.ttf")
levelN.setFont(font)
levelN.setTextColor(1, 1, 1, 1)
levelN.setSlant(0.1)
levelN.setShadow(0.05)
levelN.setShadowColor(255, 0, 0, 1)
textNodePath = self.aspect2d.attachNewNode(levelN)
textNodePath.setPos(-0.45, 0, 0)
textNodePath.setScale(0.2)
示例4: checkIfEccoDied
# 需要导入模块: from panda3d.core import TextNode [as 别名]
# 或者: from panda3d.core.TextNode import setShadow [as 别名]
def checkIfEccoDied(self):
print "position" + str(self.pos.getY())
if self.pos.getZ() > -50.0 and self.pos.getZ() < 0.0:
title = "Game Over"
levelCompleteN = TextNode('ecco-died')
font = loader.loadFont("font/Caveman.ttf")
levelCompleteN.setFont(font)
levelCompleteN.setText(title)
levelCompleteN.setTextColor(1, 1, 1, 1)
levelCompleteN.setSlant(0.1)
levelCompleteN.setShadow(0.03)
levelCompleteN.setShadowColor(0, 0, 200, 1)
# levelN.setFrameAsMargin(0, 0, 0, 0)
levelCompleteN.setFrameColor(200, 0, 0, 1)
levelCompleteN.setFrameLineWidth(5.0)
# textNp.node().setGlyphShift(1.0)
textNodePath = self.aspect2d.attachNewNode(levelCompleteN)
textNodePath.setPos(-0.9, 1.5, 0.5)
textNodePath.setScale(0.2)
if self.pos.getZ() < -49.0:
self.gameOverSound.play()
elif self.pos.getZ() < -50.0:
if self.gameOverSound.status() != self.gameOverSound.PLAYING:
sys.exit(1)
elif self.pos.getY() > 1300.0:
title = "Level 1 \n Complete"
levelCompleteN = TextNode('level-complete')
font = loader.loadFont("font/Caveman.ttf")
levelCompleteN.setFont(font)
levelCompleteN.setText(title)
levelCompleteN.setTextColor(1, 1, 1, 1)
levelCompleteN.setSlant(0.1)
levelCompleteN.setShadow(0.03)
levelCompleteN.setShadowColor(0, 0, 200, 1)
# levelN.setFrameAsMargin(0, 0, 0, 0)
levelCompleteN.setFrameColor(200, 0, 0, 1)
levelCompleteN.setFrameLineWidth(5.0)
# textNp.node().setGlyphShift(1.0)
textNodePath = self.aspect2d.attachNewNode(levelCompleteN)
textNodePath.setPos(-0.6, 1.5, 0.5)
textNodePath.setScale(0.2)
if self.levelCompleteSound.status() != self.levelCompleteSound.PLAYING:
self.levelCompleteSound.play()
else:
pass
示例5: setupLevelDisplay2
# 需要导入模块: from panda3d.core import TextNode [as 别名]
# 或者: from panda3d.core.TextNode import setShadow [as 别名]
def setupLevelDisplay2(self):
LEVEL_2 = "Level 2"
levelDisplay(LEVEL_2)
levelN = TextNode('level-display')
levelN.setText(LEVEL_2)
# www.webpagepublicity.com
font = loader.loadFont("font/Caveman.ttf")
levelN.setFont(font)
levelN.setTextColor(1, 1, 1, 1)
levelN.setSlant(0.1)
levelN.setShadow(0.05)
levelN.setShadowColor(255, 0, 0, 1)
# levelN.setFrameAsMargin(0, 0, 0, 0)
# levelN.setFrameColor(0, 0, 255, 1)
# levelN.setFrameLineWidth(5.0)
# # textNp.node().setGlyphShift(1.0)
textNodePath = self.aspect2d.attachNewNode(levelN)
textNodePath.setPos(-0.45, 0, 0)
textNodePath.setScale(0.2)
示例6: __init__
# 需要导入模块: from panda3d.core import TextNode [as 别名]
# 或者: from panda3d.core.TextNode import setShadow [as 别名]
def __init__(self):
ShowBase.__init__(self)
base.setBackgroundColor(0, 0, 0)
game_title = "ECCO"
titleN = TextNode('game-title')
font = loader.loadFont("font/Caveman.ttf")
titleN.setFont(font)
titleN.setText(game_title)
titleN.setTextColor(1, 1, 1, 1)
titleN.setSlant(0.1)
titleN.setShadow(0.05)
titleN.setShadowColor(0, 0, 200, 1)
titleN.setFrameColor(0, 0, 255, 1)
titleN.setFrameLineWidth(5.0)
textNodePath = self.aspect2d.attachNewNode(titleN)
textNodePath.setPos(-0.4, 1.5, 0.5)
textNodePath.setScale(0.2)
self.level1Button = DirectButton(text=("Level 1"), scale=.1, pos=(0, 0, 0.2), command=self.level1)
self.level2Button = DirectButton(text=("Level 2"), scale=.1, pos=(0, 0, 0), command=self.level2)
示例7: getBackgroundSet
# 需要导入模块: from panda3d.core import TextNode [as 别名]
# 或者: from panda3d.core.TextNode import setShadow [as 别名]
def getBackgroundSet(menuItem, frame, arrowhead):
item = menuItem.item
kind = item['kind']
txt = item['txt']
grphcs = []
slctrs = ['menu '+kind]
if 'class' in item: # class after kind: class has higher priority
slctrs.append('.'+item['class'])
if 'id' in item: # id after class: id has higher priority
slctrs.append('#'+item['id'])
style = getStyle(slctrs, menuItem.cssFName)
if 'enter-sound' in style: loadSound(menuItem, menuItem.getEnterEvent(), style, 'enter-sound')
if 'exit-sound' in style: loadSound(menuItem, menuItem.getExitEvent(), style, 'exit-sound')
if 'press-sound' in style: loadSound(menuItem, menuItem.getPressEvent(MouseButton.one()), style, 'press-sound')
if 'release-sound' in style: loadSound(menuItem, menuItem.getReleaseEvent(MouseButton.one()), style, 'release-sound')
if 'drag-sound' in style: loadSound(menuItem, None, style, 'drag-sound')
for state in STATES:
slctrs = ['menu '+kind+' :'+stateName[state].lower()]
if 'class' in item: # class after kind: class has higher priority
slctrs.append('.'+item['class']+' :'+stateName[state].lower())
if 'id' in item: # id after class: id has higher priority
slctrs.append('#'+item['id']+' :'+stateName[state].lower())
style = getStyle(slctrs, menuItem.cssFName)
# Want to add more style properties?
# Do it here:
# Match style keys here to property names in .ccss
fontSize = style['font-size']
bevel = style['bevel']*fontSize
font = style['font']
color = style['color']
tn = TextNode(txt)
tn.setText(txt)
tn.setFont(loader.loadFont(font))
tn.setSlant(style['slant'])
tn.setTextColor(color)
tn.setShadow(*style['shadow-offset'])
tn.setShadowColor(*style['shadow-color'])
NodePath(tn).setScale(fontSize)
sHolder = NodePath(PandaNode('sHolder'))
sHolder.attachNewNode(tn)
grphcs.append(sHolder)
sHolder.attachNewNode(tn)
borderColor = style['border-Color']
thk = style['border-thickness']
if 'background-Color' in style and\
style['background-Color'] != 'transparent':
bgColor = style['background-Color']
else: bgColor = None
if kind=='parent':
if state==HOVER: ar = arrowhead*2
else: ar = arrowhead
grphcs[state].attachNewNode(bevelArrow(frame, bevel, ar, thk, color, borderColor, bgColor))
elif kind in ('horizontal', 'titleBar', 'close'):
grphcs[state].attachNewNode(rectangle(frame, thk, color, borderColor, bgColor))
elif kind=='checkBox':
grphcs[state].attachNewNode(checkBox(frame, bevel, thk, color, borderColor, bgColor))
cb = grphcs[state].attachNewNode(checkedBox(frame, bevel, thk, color, borderColor, bgColor))
cb.hide()
elif kind=='radioBTN':
grphcs[state].attachNewNode(radioBTN(frame, bevel, thk, color, borderColor, bgColor))
cb = grphcs[state].attachNewNode(checkedRadioBTN(frame, bevel, thk, color, borderColor, bgColor))
cb.hide()
else:
grphcs[state].attachNewNode(bevelBG(frame, bevel, thk, borderColor, bgColor))
return grphcs
示例8: MessageWriter
# 需要导入模块: from panda3d.core import TextNode [as 别名]
# 或者: from panda3d.core.TextNode import setShadow [as 别名]
class MessageWriter(DirectObject):
def __init__(self):
# the tasktime the last sign in the textfield was written
self.lastSign = 0.0
# the sign that is actually written in the textfield
self.currentSign = 0
# the text to write in the textfield
self.textfieldText = ""
# stop will be used to check if the writing is finished or
# somehow else stoped
self.stop = False
# the speed new letters are added to the text
# the time, how long the text is shown after it is fully written
self.showlength = 4
# the textfield to put instructions hints and everything else, that
# should be slowly written on screen and disappear after a short while
self.textfield = TextNode('textfield')
self.textfield.clearText()
self.textfield.setShadow(0.005, 0.005)
self.textfield.setShadowColor(0, 0, 0, 1)
self.textfield.setWordwrap(base.a2dRight*2-0.4)
self.textfield.setCardActual(
-0.1, base.a2dRight*2-0.3,
0.1, base.a2dBottom+0.5)
self.textfield.setCardColor(0,0,0,0.45)
self.textfield.setFlattenFlags(TextNode.FF_none)
self.textfield.setTextScale(0.06)
self.textfieldNodePath = aspect2d.attachNewNode(self.textfield)
self.textfieldNodePath.setScale(1)
self.textfieldNodePath.setPos(base.a2dLeft+0.2, 0, -0.4)
self.hide()
def show(self):
self.textfieldNodePath.show()
def hide(self):
self.textfield.clearText()
self.textfieldNodePath.hide()
def clear(self):
"""Clear the textfield and stop the current written text"""
self.hide()
taskMgr.remove("writeText")
self.stop = False
self.writeDone = False
self.currentSign = 0
self.lastSign = 0.0
self.textfield.clearText()
def cleanup(self):
"""Function that should be called to remove and reset the
message writer"""
self.clear()
self.ignore("showMessage")
def run(self):
"""This function can be called to start the writer task."""
self.textfield.setFlattenFlags(TextNode.FF_none)
taskMgr.add(self.__writeText, "writeText", priority=30)
def setMessageAndShow(self, message):
"""Function to simply add a new message and show it if no other
message is currently shown"""
self.clear()
logging.debug("show message %s" % message)
self.textfieldText = message
self.show()
# start the writer task
self.run()
def __writeText(self, task):
elapsed = globalClock.getDt()
if(self.stop):
# text is finished and can be cleared now
self.clear()
return task.done
if self.currentSign == len(self.textfieldText)-1:
self.textfield.setFlattenFlags(TextNode.FF_dynamic_merge)
if self.currentSign >= len(self.textfieldText):
# check if the text is fully written
if task.time - self.lastSign >= self.showlength:
# now also check if the time the text should
# be visible on screen has elapsed
self.stop = True
self.textfieldNodePath.flattenStrong()
elif (task.time - self.lastSign > base.textWriteSpeed) and (not self.stop):
# write the next letter of the text
self.textfield.appendText(self.textfieldText[self.currentSign])
self.currentSign += 1
self.lastSign = task.time
return task.cont
示例9: __init__
# 需要导入模块: from panda3d.core import TextNode [as 别名]
# 或者: from panda3d.core.TextNode import setShadow [as 别名]
#.........这里部分代码省略.........
def showChat(self):
self.chatHidden = False
def hideThought(self):
self.thoughtHidden = True
def showThought(self):
self.thoughtHidden = False
def applyClickState(self, clickState):
if self.chatBalloon is not None:
foreground, background = self.chatColor[clickState]
if self.chatType == NametagGlobals.SPEEDCHAT:
background = self.speedChatColor
if background[3] > self.CHAT_BALLOON_ALPHA:
background = VBase4(
background[0], background[1], background[2],
self.CHAT_BALLOON_ALPHA)
self.chatBalloon.setForeground(foreground)
self.chatBalloon.setBackground(background)
self.chatBalloon.setButton(self.chatButton[clickState])
elif self.panel is not None:
foreground, background = self.nametagColor[clickState]
self.setForeground(foreground)
self.setBackground(background)
def setText(self, text):
self.textNode.setText(text)
def getText(self):
return self.textNode.getText()
def setChatText(self, chatText):
self.chatTextNode.setText(chatText)
def getChatText(self):
return self.chatTextNode.getText()
def setWordWrap(self, wordWrap):
if wordWrap is None:
wordWrap = self.TEXT_WORD_WRAP
self.textNode.setWordwrap(wordWrap)
self.update()
def getWordWrap(self):
return self.textNode.getWordwrap()
def setChatWordWrap(self, chatWordWrap):
if (chatWordWrap is None) or (chatWordWrap > self.CHAT_TEXT_WORD_WRAP):
chatWordWrap = self.CHAT_TEXT_WORD_WRAP
self.chatTextNode.setWordwrap(chatWordWrap)
self.update()
def getChatWordWrap(self):
return self.chatTextNode.getWordwrap()
def setForeground(self, foreground):
self.textNode.setTextColor(foreground)
def setBackground(self, background):
if self.panel is not None:
self.panel.setColor(background)
def setShadow(self, shadow):
self.textNode.setShadow(shadow)
def getShadow(self):
return self.textNode.getShadow()
def clearShadow(self):
self.textNode.clearShadow()
def update(self):
if self.chatBalloon is not None:
self.chatBalloon.removeNode()
self.chatBalloon = None
if self.panel is not None:
self.panel.removeNode()
self.panel = None
if self.getChatText():
if self.chatBalloonType == NametagGlobals.CHAT_BALLOON:
if not self.chatHidden:
model = self.getChatBalloonModel()
modelWidth = self.getChatBalloonWidth()
modelHeight = self.getChatBalloonHeight()
self.drawChatBalloon(model, modelWidth, modelHeight)
return
elif self.chatBalloonType == NametagGlobals.THOUGHT_BALLOON:
if not self.thoughtHidden:
model = NametagGlobals.thoughtBalloonModel
modelWidth = NametagGlobals.thoughtBalloonWidth
modelHeight = NametagGlobals.thoughtBalloonHeight
self.drawChatBalloon(model, modelWidth, modelHeight)
return
if self.getText() and (not self.nametagHidden):
self.drawNametag()
示例10: MyApp
# 需要导入模块: from panda3d.core import TextNode [as 别名]
# 或者: from panda3d.core.TextNode import setShadow [as 别名]
class MyApp(ShowBase):
def __init__(self, server):
ShowBase.__init__(self)
#the way the user interface can read held down buttons is by
#setting the button to be true when it's pressed down, and then
#it sets it back to false when it's released
#I have a constant while loop that'll simply read the key dictionary
#and act whenever one of the values reads True, or in this case 1
self.keys = {"w": 0, "s": 0, "d": 0, "a":0,"u":0, "e":0,"r": 0,"l": 0}
self.initPart2()
#part 2 of the init, the first one got taken up by alot of comments
def initPart2(self):
#assigns all of the variables needed in the class
self.defineVariables()
self.loadEnvironments()
self.camera.setPos(29,-20,2)
# self.camera.setHpr(-123.333, 0, 0)
self.loadModels()
self.initializeKeys1()
self.initializeKeys2()
self.startThreads()
#these are the data variables that are being sent by the server. so far,
#I haven't displayed any of these variables, as I've noticed they cause
#a fair amount of lag/delay, but I am implementing the gyroscope values
def defineVariables(self):
self.initializePiVariables()
self.initializePandaVarialbes()
def initializePiVariables(self):
self.ail = 0
self.ele = 0
self.thr = 0
self.rud = 0
self.gyroX = 0
self.gyroY = 0
self.yaw = 0
#initializing more global variables
def initializePandaVarialbes(self):
self.cameraSpeed = 0.5
self.moveSpeed = 0.2
self.quadDistance = 15
self.noYawInput = True
self.throttlePower = "o "
self.dX = 0
self.dTheta = 0
self.isMoving = False
self.dictOfRecords = dict()
self.keysPressedDown = set()
self.username = ""
self.initializePandaVariablesPart2()
def initializePandaVariablesPart2(self):
self.timer = 0.00
self.timerRunning = False
self.timerLastModified = self.getTime()
self.initializePromptTextPart1()
self.initializePromptTextPart2()
self.initializePressedDownKeyText()
self.toggleLiftOff = True
self.listOfModelPaths= ['models/fighter/fighter',
'models/boeing/boeing707', 'models/r2d2/r2d2',
'models/blimp/blimp', 'models/seeker/seeker',
'models/jeep/jeep']
self.modelIndex = 0
def initializePromptTextPart1(self):
self.timerText = TextNode('timer')
self.timerText.setText("Time:" + "0" + str(self.timer))
self.timerText.setShadow(0.05, 0.05)
self.timerTextNodePath = aspect2d.attachNewNode(self.timerText)
self.timerTextNodePath.setScale(0.07)
self.timerTextNodePath.setPos(1.2,0,0.9)
self.saveTimeText = TextNode('would you like to save?')
self.saveTimeText.setText('')#
self.saveTimeText.setShadow(0.05, 0.05)
self.saveTimeTextNodePath = aspect2d.attachNewNode(self.saveTimeText)
self.saveTimeTextNodePath.setScale(0.07)
self.saveTimeTextNodePath.setPos(1.1, 0, 0.8)
def initializePromptTextPart2(self):
self.thrStatus = ""
self.loadModelsText = "Select your model!\nPress [B] to go back!"
line1 = "Press [H] for Help!\n"
line2 = "Press [L] to load high scores!\n"
line3 = "Press [G] to change skins!\n\n"
line4 = "Throttle Status: " + self.thrStatus
#.........这里部分代码省略.........
示例11: __init__
# 需要导入模块: from panda3d.core import TextNode [as 别名]
# 或者: from panda3d.core.TextNode import setShadow [as 别名]
def __init__(self):
ShowBase.__init__(self)
self.disableMouse()
self.camLens.setNear(0.01)
self.camLens.setFar(100)
self.camLens.setFov(config.camera_angle)
self.setBackgroundColor(Vec4(0, 0, 0, 0))
self.setFrameRateMeter(True)
self.level = load_level(config.start_level)
self.dir = Direction()
self.pos = Vector([0, 0])
level_node = render_level(self.level)
level_node.reparentTo(self.render)
self.accept("escape", exit)
self.accept("arrow_up", self.forward)
self.accept("arrow_down", self.reverse)
self.accept("arrow_down", self.backwards)
self.accept("arrow_left", self.turn_left)
self.accept("arrow_right", self.turn_right)
self.accept("1", self.set_camera_in)
self.accept("2", self.set_camera_out)
self.accept("3", self.spin_camera_left)
self.accept("4", self.spin_camera_right)
self.accept("s", self.toggle_smoke)
title = OnscreenText(text="Bard's Tale I",
style=1, fg=(1,1,1,1),
pos=(0.7,0.92), scale = .07)
slight = PointLight('slight')
slight.setColor(Vec4(1, 1, 1, 1))
slnp = render.attachNewNode(slight)
#slight.setAttenuation((1, 0, 0.02))
render.setLight(slnp)
self.slight = slight
self.light = slnp
alight = AmbientLight('alight')
amb = 0.05
alight.setColor((amb, amb, amb, 1))
alnp = render.attachNewNode(alight)
self.alight = alight
render.setLight(alnp)
text = TextNode("foo")
text.setText("")
text.setShadow(0.2,0.2)
text.setShadowColor(0, 0, 0, 1)
tn = NodePath(text)
tn.setScale(0.1)
tn.reparentTo(aspect2d)
tn.setPos(-1, -1, 0)
self.text = text
print self.eventMgr
from panda3d.core import AntialiasAttrib
self.render.setAntialias(AntialiasAttrib.MMultisample)
self.follow = True
self.set_camera()
render.setAttrib(LightRampAttrib.makeIdentity())
render.setShaderAuto()