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])
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])
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)
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 __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]
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])
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
def __init__(self, textId): SCTerminal.__init__(self) self.textId = textId self.text = SpeedChatStaticText[self.textId]
def __init__(self, textId): SCTerminal.__init__(self) gmHandler = SpeedChatGMHandler.SpeedChatGMHandler() self.textId = textId self.text = gmHandler.getPhrase(textId)
def handleSelect(self, displayType=0): SCTerminal.handleSelect(self, displayType) messenger.send(self.getEventName(SCStaticTextMsgEvent), [self.textId, displayType])
def handleSelect(self): SCTerminal.handleSelect(self) messenger.send(self.getEventName(SCGMTextMsgEvent), [self.textId])
def exitVisible(self): SCTerminal.exitVisible(self) self.ignore(Emote.globalEmote.EmoteEnableStateChanged)
def __init__(self, textId): SCTerminal.__init__(self) self.textId = textId self.text = CustomSCStrings[self.textId]
def handleSelect(self): SCTerminal.handleSelect(self) messenger.send(self.getEventName(SCStaticTextMsgEvent), [self.textId])
def handleSelect(self, displayType=0): SCTerminal.handleSelect(self) messenger.send(self.getEventName(SCCustomMsgEvent), [self.textId])