本文整理汇总了Python中pandac.PandaModules.TextNode.getShadow方法的典型用法代码示例。如果您正苦于以下问题:Python TextNode.getShadow方法的具体用法?Python TextNode.getShadow怎么用?Python TextNode.getShadow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pandac.PandaModules.TextNode
的用法示例。
在下文中一共展示了TextNode.getShadow方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pandac.PandaModules import TextNode [as 别名]
# 或者: from pandac.PandaModules.TextNode import getShadow [as 别名]
#.........这里部分代码省略.........
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):
try:
text = self.textNode.getText()
return text
except AttributeError:
return None
def setChatText(self, chatText):
self.chatTextNode.setText(chatText)
def getChatText(self):
try:
text = self.chatTextNode.getText()
return text
except AttributeError:
return None
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 removeBalloon(self):
if self.chatBalloon:
self.chatBalloon.removeNode()
self.chatBalloon = None
def removePanel(self):
if self.panel:
self.panel.removeNode()
self.panel = None
def removeIcon(self):
if self.icon:
self.icon.removeAllChildren()
self.icon = None
def update(self):
self.removeBalloon()
self.removePanel()
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 hasattr(self.avatar, 'ghostMode'):
if self.avatar.ghostMode == 2:
return
if self.getText() and (not self.nametagHidden):
self.drawNametag()