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