Ejemplo n.º 1
0
 def __init__(self, emoteId):
     SCTerminal.__init__(self)
     self.emoteId = emoteId
     if not self.__ltHasAccess():
         self.text = '?'
     else:
         self.text = EmoteList[self.emoteId]
 def __init__(self, emoteId):
     SCTerminal.__init__(self)
     self.emoteId = emoteId
     if not self.__ltHasAccess():
         self.text = '?'
     else:
         self.text = EmoteList[self.emoteId]
 def handleSelect(self, displayType=0):
     if not self.__ltHasAccess():
         messenger.send(self.getEventName(SCEmoteNoAccessEvent))
     elif self.__emoteEnabled():
         SCTerminal.handleSelect(self, displayType)
         #messenger.send(self.getEventName(SCEmoteMsgEvent), [self.emoteId, displayType]) # Is displayType used for anything?
         messenger.send(self.getEventName(SCEmoteMsgEvent), [self.emoteId])
Ejemplo n.º 4
0
 def handleSelect(self):
     if not self._SCEmoteTerminal__ltHasAccess():
         messenger.send(self.getEventName(SCEmoteNoAccessEvent))
     elif self._SCEmoteTerminal__emoteEnabled():
         SCTerminal.handleSelect(self)
         messenger.send(self.getEventName(SCEmoteMsgEvent), [
             self.emoteId])
Ejemplo n.º 5
0
    def finalize(self, dbArgs={}):
        if not self.isDirty():
            return

        args = {}

        if ((not self.__ltHasAccess()) or
            (not self.__emoteEnabled())):
            # make the button 'unclickable'
            args.update({
                'rolloverColor': (0,0,0,0),
                'pressedColor': (0,0,0,0),
                'rolloverSound': None,
                'text_fg': self.getColorScheme().getTextDisabledColor()+(1,),
                })
        if not self.__ltHasAccess():
            # if localToon doesn't have access to this emote, the
            # button has a '?' on it. make sure it's centered
            args.update({
                'text_align': TextNode.ACenter,
                })
        elif not self.__emoteEnabled():
            # don't play a sound if user clicks on a disabled emote
            # that they have access to
            args.update({
                'clickSound': None,
            })

        self.lastEmoteEnableState = self.__emoteEnabled()
        
        args.update(dbArgs)
        SCTerminal.finalize(self, dbArgs=args)
 def enterVisible(self):
     SCTerminal.enterVisible(self)
     if self.__ltHasAccess():
         if hasattr(self, 'lastEmoteEnableState'):
             if self.lastEmoteEnableState != self.__emoteEnabled():
                 self.invalidate()
         if not self.isWhispering():
             self.accept(Emote.globalEmote.EmoteEnableStateChanged, self.__emoteEnableStateChanged)
Ejemplo n.º 7
0
 def handleSelect(self):
     if not self.__ltHasAccess():
         messenger.send(self.getEventName(SCEmoteNoAccessEvent))
     else:
         if self.__emoteEnabled():
             SCTerminal.handleSelect(self)
             messenger.send(self.getEventName(SCEmoteMsgEvent),
                            [self.emoteId])
 def enterVisible(self):
     SCTerminal.enterVisible(self)
     if self.__ltHasAccess():
         if hasattr(self, 'lastEmoteEnableState'):
             if self.lastEmoteEnableState != self.__emoteEnabled():
                 self.invalidate()
         if not self.isWhispering():
             self.accept(Emote.globalEmote.EmoteEnableStateChanged, self.__emoteEnableStateChanged)
Ejemplo n.º 9
0
 def __init__(self, emoteId):
     SCTerminal.__init__(self)
     self.emoteId = emoteId
     # look up the emote name that should be displayed
     if not self.__ltHasAccess():
         self.text = '?'
     else:
         self.text = EmoteList[self.emoteId]
Ejemplo n.º 10
0
 def handleSelect(self):
     if not self.__ltHasAccess():
         messenger.send(self.getEventName(SCEmoteNoAccessEvent))
     else:
         if self.__emoteEnabled():
             # calling this makes the speedchat menu go away
             SCTerminal.handleSelect(self)
             messenger.send(self.getEventName(SCEmoteMsgEvent),
                            [self.emoteId])
Ejemplo n.º 11
0
 def enterVisible(self):
     SCTerminal.enterVisible(self)
     if self.__ltHasAccess():
         # if the emote enable state has changed since the last time
         # we were finalized, invalidate
         if hasattr(self, 'lastEmoteEnableState'):
             if self.lastEmoteEnableState != self.__emoteEnabled():
                 self.invalidate()
                 
         if not self.isWhispering():
             self.accept(Emote.globalEmote.EmoteEnableStateChanged,
                         self.__emoteEnableStateChanged)
 def finalize(self, dbArgs = {}):
     if not self.isDirty():
         return
     args = {}
     if not self.__ltHasAccess() or not self.__emoteEnabled():
         args.update({'rolloverColor': (0, 0, 0, 0),
          'pressedColor': (0, 0, 0, 0),
          'rolloverSound': None,
          'text_fg': self.getColorScheme().getTextDisabledColor() + (1,)})
     if not self.__ltHasAccess():
         args.update({'text_align': TextNode.ACenter})
     elif not self.__emoteEnabled():
         args.update({'clickSound': None})
     self.lastEmoteEnableState = self.__emoteEnabled()
     args.update(dbArgs)
     SCTerminal.finalize(self, dbArgs=args)
     return
Ejemplo n.º 13
0
 def finalize(self, dbArgs = {}):
     if not self.isDirty():
         return
     args = {}
     if not self.__ltHasAccess() or not self.__emoteEnabled():
         args.update({'rolloverColor': (0, 0, 0, 0),
          'pressedColor': (0, 0, 0, 0),
          'rolloverSound': None,
          'text_fg': self.getColorScheme().getTextDisabledColor() + (1,)})
     if not self.__ltHasAccess():
         args.update({'text_align': TextNode.ACenter})
     elif not self.__emoteEnabled():
         args.update({'clickSound': None})
     self.lastEmoteEnableState = self.__emoteEnabled()
     args.update(dbArgs)
     SCTerminal.finalize(self, dbArgs=args)
     return
 def __init__(self, textId):
     SCTerminal.__init__(self)
     self.textId = textId
     self.text = SpeedChatStaticText[self.textId]
Ejemplo n.º 15
0
 def __init__(self, textId):
     SCTerminal.__init__(self)
     gmHandler = SpeedChatGMHandler.SpeedChatGMHandler()
     self.textId = textId
     self.text = gmHandler.getPhrase(textId)
Ejemplo n.º 16
0
 def handleSelect(self, displayType=0):
     SCTerminal.handleSelect(self, displayType)
     messenger.send(self.getEventName(SCStaticTextMsgEvent),
                    [self.textId, displayType])
 def __init__(self, textId):
     SCTerminal.__init__(self)
     gmHandler = SpeedChatGMHandler.SpeedChatGMHandler()
     self.textId = textId
     self.text = gmHandler.getPhrase(textId)
 def handleSelect(self):
     SCTerminal.handleSelect(self)
     messenger.send(self.getEventName(SCGMTextMsgEvent), [self.textId])
Ejemplo n.º 19
0
 def exitVisible(self):
     SCTerminal.exitVisible(self)
     self.ignore(Emote.globalEmote.EmoteEnableStateChanged)
Ejemplo n.º 20
0
 def __init__(self, textId):
     SCTerminal.__init__(self)
     self.textId = textId
     self.text = SpeedChatStaticText[self.textId]
 def __init__(self, textId):
     SCTerminal.__init__(self)
     self.textId = textId
     self.text = CustomSCStrings[self.textId]
Ejemplo n.º 22
0
 def exitVisible(self):
     SCTerminal.exitVisible(self)
     self.ignore(Emote.globalEmote.EmoteEnableStateChanged)
Ejemplo n.º 23
0
 def __init__(self, textId):
     SCTerminal.__init__(self)
     self.textId = textId
     self.text = CustomSCStrings[self.textId]
Ejemplo n.º 24
0
 def handleSelect(self):
     SCTerminal.handleSelect(self)
     messenger.send(self.getEventName(SCStaticTextMsgEvent), [self.textId])
Ejemplo n.º 25
0
 def handleSelect(self, displayType=0):
     SCTerminal.handleSelect(self)
     messenger.send(self.getEventName(SCCustomMsgEvent), [self.textId])