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


Python ChatInputWhiteListFrame.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from otp.chat.ChatInputWhiteListFrame import ChatInputWhiteListFrame [as 别名]
# 或者: from otp.chat.ChatInputWhiteListFrame.ChatInputWhiteListFrame import __init__ [as 别名]
 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,代码行数:45,代码来源:TTChatInputWhiteList.py

示例2: __init__

# 需要导入模块: from otp.chat.ChatInputWhiteListFrame import ChatInputWhiteListFrame [as 别名]
# 或者: from otp.chat.ChatInputWhiteListFrame.ChatInputWhiteListFrame import __init__ [as 别名]
 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,代码行数:79,代码来源:TTChatInputWhiteList.py


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