本文整理汇总了Python中otp.nametag.NametagGroup.NametagGroup.hasButton方法的典型用法代码示例。如果您正苦于以下问题:Python NametagGroup.hasButton方法的具体用法?Python NametagGroup.hasButton怎么用?Python NametagGroup.hasButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类otp.nametag.NametagGroup.NametagGroup
的用法示例。
在下文中一共展示了NametagGroup.hasButton方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Avatar
# 需要导入模块: from otp.nametag.NametagGroup import NametagGroup [as 别名]
# 或者: from otp.nametag.NametagGroup.NametagGroup import hasButton [as 别名]
#.........这里部分代码省略.........
def hideName(self):
self.nametag.getNametag3d().setContents(Nametag.CSpeech | Nametag.CThought)
def showName(self):
if self.__nameVisible and not self.ghostMode:
self.nametag.getNametag3d().setContents(Nametag.CName | Nametag.CSpeech | Nametag.CThought)
def hideNametag2d(self):
self.nametag2dContents = 0
self.nametag.getNametag2d().setContents(self.nametag2dContents & self.nametag2dDist)
def showNametag2d(self):
self.nametag2dContents = self.nametag2dNormalContents
if self.ghostMode:
self.nametag2dContents = Nametag.CSpeech
self.nametag.getNametag2d().setContents(self.nametag2dContents & self.nametag2dDist)
def hideNametag3d(self):
self.nametag.getNametag3d().setContents(0)
def showNametag3d(self):
if self.__nameVisible and not self.ghostMode:
self.nametag.getNametag3d().setContents(Nametag.CName | Nametag.CSpeech | Nametag.CThought)
else:
self.nametag.getNametag3d().setContents(0)
def setPickable(self, flag):
self.nametag.setActive(flag)
def clickedNametag(self):
MagicWordManager.lastClickedNametag = self
if self.nametag.hasButton():
self.advancePageNumber()
elif self.nametag.isActive():
messenger.send('clickedNametag', [self])
def setPageChat(self, addressee, paragraph, message, quitButton, extraChatFlags = None, dialogueList = [], pageButton = True):
self.__chatAddressee = addressee
self.__chatPageNumber = None
self.__chatParagraph = paragraph
self.__chatMessage = message
if extraChatFlags is None:
self.__chatFlags = CFSpeech
else:
self.__chatFlags = CFSpeech | extraChatFlags
self.__chatDialogueList = dialogueList
self.__chatSet = 0
self.__chatLocal = 0
self.__updatePageChat()
if addressee == base.localAvatar.doId:
if pageButton:
self.__chatFlags |= CFPageButton
if quitButton == None:
self.__chatFlags |= CFNoQuitButton
elif quitButton:
self.__chatFlags |= CFQuitButton
self.b_setPageNumber(self.__chatParagraph, 0)
return
def setLocalPageChat(self, message, quitButton, extraChatFlags = None, dialogueList = []):
self.__chatAddressee = base.localAvatar.doId
self.__chatPageNumber = None
self.__chatParagraph = None
self.__chatMessage = message