当前位置: 首页>>代码示例>>Python>>正文


Python ChatInputWhiteListFrame.ChatInputWhiteListFrame类代码示例

本文整理汇总了Python中otp.chat.ChatInputWhiteListFrame.ChatInputWhiteListFrame的典型用法代码示例。如果您正苦于以下问题:Python ChatInputWhiteListFrame类的具体用法?Python ChatInputWhiteListFrame怎么用?Python ChatInputWhiteListFrame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ChatInputWhiteListFrame类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self, parent = None, **kw):
     entryOptions = {'parent': self,
      'relief': DGG.SUNKEN,
      'scale': 0.05,
      'frameColor': (0.9, 0.9, 0.85, 0.0),
      'pos': (-0.2, 0, 0.11),
      'entryFont': OTPGlobals.getInterfaceFont(),
      'width': 8.6,
      'numLines': 3,
      'cursorKeys': 0,
      'backgroundFocus': 0,
      'suppressKeys': 0,
      'suppressMouse': 1,
      'command': self.sendChat,
      'failedCommand': self.sendFailed,
      'focus': 0,
      'text': '',
      'sortOrder': DGG.FOREGROUND_SORT_INDEX}
     ChatInputWhiteListFrame.__init__(self, entryOptions, parent, **kw)
     self.whiteList = TTWhiteList()
     base.whiteList = self.whiteList
     base.ttwl = self
     self.autoOff = 1
     self.sendBy = 'Data'
     self.prefilter = 0
     self.promoteWhiteList = 1
     self.typeGrabbed = 0
     self.deactivate()
     gui = loader.loadModel('phase_3.5/models/gui/chat_input_gui')
     self.chatFrame = DirectFrame(parent=self, image=gui.find('**/Chat_Bx_FNL'), relief=None, pos=(0.0, 0, 0.0), state=DGG.NORMAL)
     self.chatButton = DirectButton(parent=self.chatFrame, image=(gui.find('**/ChtBx_ChtBtn_UP'), gui.find('**/ChtBx_ChtBtn_DN'), gui.find('**/ChtBx_ChtBtn_RLVR')), pos=(0.182, 0, -0.088), relief=None, text=('', OTPLocalizer.ChatInputNormalSayIt, OTPLocalizer.ChatInputNormalSayIt), text_scale=0.06, text_fg=Vec4(1, 1, 1, 1), text_shadow=Vec4(0, 0, 0, 1), text_pos=(0, -0.09), textMayChange=0, command=self.chatButtonPressed)
     self.cancelButton = DirectButton(parent=self.chatFrame, image=(gui.find('**/CloseBtn_UP'), gui.find('**/CloseBtn_DN'), gui.find('**/CloseBtn_Rllvr')), pos=(-0.151, 0, -0.088), relief=None, text=('', OTPLocalizer.ChatInputNormalCancel, OTPLocalizer.ChatInputNormalCancel), text_scale=0.06, text_fg=Vec4(1, 1, 1, 1), text_shadow=Vec4(0, 0, 0, 1), text_pos=(0, -0.09), textMayChange=0, command=self.cancelButtonPressed)
     self.whisperLabel = DirectLabel(parent=self.chatFrame, pos=(0.02, 0, 0.23), relief=DGG.FLAT, frameColor=(1, 1, 0.5, 1), frameSize=(-0.23,
      0.23,
      -0.07,
      0.05), text=OTPLocalizer.ChatInputNormalWhisper, text_scale=0.04, text_fg=Vec4(0, 0, 0, 1), text_wordwrap=9.5, textMayChange=1)
     self.chatEntry.bind(DGG.OVERFLOW, self.chatOverflow)
     self.chatEntry.bind(DGG.TYPE, self.typeCallback)
     self.trueFriendChat = 0
     if base.config.GetBool('whisper-to-nearby-true-friends', 1):
         self.accept(self.TFToggleKey, self.shiftPressed)
         
     return
开发者ID:Teku16,项目名称:ToontownPlanet,代码行数:43,代码来源:TTChatInputWhiteList.py

示例2: delete

 def delete(self):
     base.whiteList = None
     ChatInputWhiteListFrame.delete(self)
     return
开发者ID:CalebSmith376,项目名称:src,代码行数:4,代码来源:TTChatInputWhiteList.py

示例3: destroy

 def destroy(self):
     self.chatEntry.destroy()
     self.chatFrame.destroy()
     self.ignoreAll()
     ChatInputWhiteListFrame.destroy(self)
开发者ID:CalebSmith376,项目名称:src,代码行数:5,代码来源:TTChatInputWhiteList.py

示例4: exitAvatarWhisper

 def exitAvatarWhisper(self):
     ChatInputWhiteListFrame.exitAvatarWhisper(self)
     self.whisperLabel.hide()
开发者ID:CalebSmith376,项目名称:src,代码行数:3,代码来源:TTChatInputWhiteList.py

示例5: enterAvatarWhisper

 def enterAvatarWhisper(self):
     ChatInputWhiteListFrame.enterAvatarWhisper(self)
     self.labelWhisper()
开发者ID:CalebSmith376,项目名称:src,代码行数:3,代码来源:TTChatInputWhiteList.py

示例6: enterPlayerWhisper

 def enterPlayerWhisper(self):
     ChatInputWhiteListFrame.enterPlayerWhisper(self)
     self.labelWhisper()
开发者ID:CalebSmith376,项目名称:src,代码行数:3,代码来源:TTChatInputWhiteList.py

示例7: exitAllChat

 def exitAllChat(self):
     ChatInputWhiteListFrame.exitAllChat(self)
开发者ID:CalebSmith376,项目名称:src,代码行数:2,代码来源:TTChatInputWhiteList.py

示例8: enterAllChat

 def enterAllChat(self):
     ChatInputWhiteListFrame.enterAllChat(self)
     self.whisperLabel.hide()
开发者ID:CalebSmith376,项目名称:src,代码行数:3,代码来源:TTChatInputWhiteList.py

示例9: sendChat

 def sendChat(self, text, overflow = False):
     if self.typeGrabbed:
         return
     else:
         ChatInputWhiteListFrame.sendChat(self, self.chatEntry.get())
开发者ID:CalebSmith376,项目名称:src,代码行数:5,代码来源:TTChatInputWhiteList.py

示例10: delete

 def delete(self):
     ChatInputWhiteListFrame.delete(self)
     return
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:3,代码来源:TTChatInputWhiteList.py

示例11: __init__

 def __init__(self, parent=None, **kw):
     entryOptions = {
         "parent": self,
         "relief": DGG.SUNKEN,
         "scale": 0.050000000000000003,
         "frameColor": (0.90000000000000002, 0.90000000000000002, 0.84999999999999998, 0.0),
         "pos": (-0.20000000000000001, 0, 0.11),
         "entryFont": OTPGlobals.getInterfaceFont(),
         "width": 8.5999999999999996,
         "numLines": 3,
         "cursorKeys": 0,
         "backgroundFocus": 0,
         "suppressKeys": 0,
         "suppressMouse": 1,
         "command": self.sendChat,
         "failedCommand": self.sendFailed,
         "focus": 0,
         "text": "",
         "sortOrder": DGG.FOREGROUND_SORT_INDEX,
     }
     ChatInputWhiteListFrame.__init__(self, entryOptions, parent, **None)
     self.whiteList = TTWhiteList()
     base.whiteList = self.whiteList
     base.ttwl = self
     self.autoOff = 1
     self.sendBy = "Data"
     self.prefilter = 0
     self.promoteWhiteList = 1
     self.typeGrabbed = 0
     self.deactivate()
     gui = loader.loadModel("phase_3.5/models/gui/chat_input_gui")
     self.chatFrame = DirectFrame(
         parent=self, image=gui.find("**/Chat_Bx_FNL"), relief=None, pos=(0.0, 0, 0.0), state=DGG.NORMAL
     )
     self.chatButton = DirectButton(
         parent=self.chatFrame,
         image=(gui.find("**/ChtBx_ChtBtn_UP"), gui.find("**/ChtBx_ChtBtn_DN"), gui.find("**/ChtBx_ChtBtn_RLVR")),
         pos=(0.182, 0, -0.087999999999999995),
         relief=None,
         text=("", OTPLocalizer.ChatInputNormalSayIt, OTPLocalizer.ChatInputNormalSayIt),
         text_scale=0.059999999999999998,
         text_fg=Vec4(1, 1, 1, 1),
         text_shadow=Vec4(0, 0, 0, 1),
         text_pos=(0, -0.089999999999999997),
         textMayChange=0,
         command=self.chatButtonPressed,
     )
     self.cancelButton = DirectButton(
         parent=self.chatFrame,
         image=(gui.find("**/CloseBtn_UP"), gui.find("**/CloseBtn_DN"), gui.find("**/CloseBtn_Rllvr")),
         pos=(-0.151, 0, -0.087999999999999995),
         relief=None,
         text=("", OTPLocalizer.ChatInputNormalCancel, OTPLocalizer.ChatInputNormalCancel),
         text_scale=0.059999999999999998,
         text_fg=Vec4(1, 1, 1, 1),
         text_shadow=Vec4(0, 0, 0, 1),
         text_pos=(0, -0.089999999999999997),
         textMayChange=0,
         command=self.cancelButtonPressed,
     )
     self.whisperLabel = DirectLabel(
         parent=self.chatFrame,
         pos=(0.02, 0, 0.23000000000000001),
         relief=DGG.FLAT,
         frameColor=(1, 1, 0.5, 1),
         frameSize=(-0.23000000000000001, 0.23000000000000001, -0.070000000000000007, 0.050000000000000003),
         text=OTPLocalizer.ChatInputNormalWhisper,
         text_scale=0.040000000000000001,
         text_fg=Vec4(0, 0, 0, 1),
         text_wordwrap=9.5,
         textMayChange=1,
     )
     self.chatEntry.bind(DGG.OVERFLOW, self.chatOverflow)
     self.chatEntry.bind(DGG.TYPE, self.typeCallback)
     self.trueFriendChat = 0
     if base.config.GetBool("whisper-to-nearby-true-friends", 1):
         self.accept(self.TFToggleKey, self.shiftPressed)
开发者ID:OldToontown,项目名称:OldToontown,代码行数:77,代码来源:TTChatInputWhiteList.py


注:本文中的otp.chat.ChatInputWhiteListFrame.ChatInputWhiteListFrame类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。