本文整理汇总了Python中panda3d.core.TextNode.clearShadow方法的典型用法代码示例。如果您正苦于以下问题:Python TextNode.clearShadow方法的具体用法?Python TextNode.clearShadow怎么用?Python TextNode.clearShadow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类panda3d.core.TextNode
的用法示例。
在下文中一共展示了TextNode.clearShadow方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from panda3d.core import TextNode [as 别名]
# 或者: from panda3d.core.TextNode import clearShadow [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()