Ejemplo n.º 1
0
 def sendChat(self, text, overflow=False):
     if self.typeGrabbed:
         return
     state = self.getCurrentOrNextState()
     if state == 'Off':
         base.localAvatar.chatMgr.chatLog.openChatlog()
     ChatInputWhiteListFrame.sendChat(self, self.chatEntry.get())
Ejemplo n.º 2
0
 def __init__(self, parent = None, **kw):
     entryOptions = {'parent': self,
      'relief': DGG.SUNKEN,
      'scale': 0.035,
      'frameColor': (0.9, 0.9, 0.85, 0.0),
      'pos': (-0.2, 0, 0.11),
      'entryFont': OTPGlobals.getInterfaceFont(),
      'width': 8.6,
      'numLines': 5,
      '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
Ejemplo n.º 3
0
 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
Ejemplo n.º 4
0
 def enterAvatarWhisper(self):
     ChatInputWhiteListFrame.enterAvatarWhisper(self)
     self.labelWhisper()
Ejemplo n.º 5
0
 def exitAllChat(self):
     ChatInputWhiteListFrame.exitAllChat(self)
Ejemplo n.º 6
0
 def sendChat(self, text, overflow=False):
     if self.typeGrabbed:
         return
     else:
         ChatInputWhiteListFrame.sendChat(self, self.chatEntry.get())
Ejemplo n.º 7
0
 def destroy(self):
     self.chatEntry.destroy()
     self.chatFrame.destroy()
     self.ignoreAll()
     ChatInputWhiteListFrame.destroy(self)
Ejemplo n.º 8
0
 def destroy(self):
     self.chatEntry.destroy()
     self.chatFrame.destroy()
     self.ignoreAll()
     ChatInputWhiteListFrame.destroy(self)
Ejemplo n.º 9
0
 def enterAvatarWhisper(self):
     ChatInputWhiteListFrame.enterAvatarWhisper(self)
     self.labelWhisper()
Ejemplo n.º 10
0
 def sendChat(self, text, overflow = False):
     assert self.notify.debug('sendChat')
     if self.typeGrabbed:
         return
     else:
         ChatInputWhiteListFrame.sendChat(self, self.chatEntry.get())
Ejemplo n.º 11
0
    def __init__(self, parent = None, **kw):
        entryOptions = {
            'parent' : self,
            'relief': DGG.SUNKEN,
            'scale': 0.05,
            #'frameSize' : (-0.2, 25.3, -0.5, 1.2),
            #'borderWidth' : (0.1, 0.1),
            '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.initialiseoptions(TTChatInputWhiteList)
        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.request("off")
        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,
            #sortOrder = DGG.FOREGROUND_SORT_INDEX,
            )

        #self.chatFrame.hide()

        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.whisperLabel.hide()
        #self.setPos(-0.35, 0.0, 0.7)

        self.chatEntry.bind(DGG.OVERFLOW, self.chatOverflow)
        self.chatEntry.bind(DGG.TYPE, self.typeCallback)
        # self.accept("typeEntryGrab", self.handleTypeGrab)

        self.trueFriendChat = 0
        if  ConfigVariableBool('whisper-to-nearby-true-friends', 1).getValue():
            self.accept(self.TFToggleKey, self.shiftPressed)
Ejemplo n.º 12
0
 def exitAvatarWhisper(self):
     ChatInputWhiteListFrame.exitAvatarWhisper(self)
     self.globalButton['state'] = DGG.NORMAL
     self.globalButton.component('text3').show()
     self.whisperLabel.hide()
Ejemplo n.º 13
0
 def enterAvatarWhisper(self):
     ChatInputWhiteListFrame.enterAvatarWhisper(self)
     self.globalButton.component('text3').hide()
     self.globalButton['state'] = DGG.DISABLED
     self.labelWhisper()
Ejemplo n.º 14
0
 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)
Ejemplo n.º 15
0
 def exitAllChat(self):
     ChatInputWhiteListFrame.exitAllChat(self)
Ejemplo n.º 16
0
 def enterPlayerWhisper(self):
     ChatInputWhiteListFrame.enterPlayerWhisper(self)
     self.labelWhisper()
Ejemplo n.º 17
0
 def exitAllChat(self):
     #print("exitAllChat")
     ChatInputWhiteListFrame.exitAllChat(self)
Ejemplo n.º 18
0
 def exitAvatarWhisper(self):
     ChatInputWhiteListFrame.exitAvatarWhisper(self)
     self.whisperLabel.hide()
Ejemplo n.º 19
0
 def enterPlayerWhisper(self):
     ChatInputWhiteListFrame.enterPlayerWhisper(self)
     #self.whisperLabel.show()
     self.labelWhisper()
Ejemplo n.º 20
0
 def delete(self):
     base.whiteList = None
     ChatInputWhiteListFrame.delete(self)
     return
Ejemplo n.º 21
0
 def enterAvatarWhisper(self):
     #print("enterAvatarWhisper")
     ChatInputWhiteListFrame.enterAvatarWhisper(self)
     #self.whisperLabel.show()
     self.labelWhisper()
Ejemplo n.º 22
0
 def delete(self):
     base.whiteList = None
     ChatInputWhiteListFrame.delete(self)
     return
 def delete(self):
     ChatInputWhiteListFrame.delete(self)
     return
Ejemplo n.º 24
0
 def enterAllChat(self):
     ChatInputWhiteListFrame.enterAllChat(self)
     self.whisperLabel.hide()
Ejemplo n.º 25
0
 def sendChat(self, text, overflow = False):
     if self.typeGrabbed:
         return
     else:
         ChatInputWhiteListFrame.sendChat(self, self.chatEntry.get())
Ejemplo n.º 26
0
 def enterPlayerWhisper(self):
     ChatInputWhiteListFrame.enterPlayerWhisper(self)
     self.labelWhisper()
Ejemplo n.º 27
0
 def enterAllChat(self):
     ChatInputWhiteListFrame.enterAllChat(self)
     self.whisperLabel.hide()
Ejemplo n.º 28
0
 def exitAvatarWhisper(self):
     ChatInputWhiteListFrame.exitAvatarWhisper(self)
     self.whisperLabel.hide()
 def delete(self):
     ChatInputWhiteListFrame.delete(self)
     return