oldschool-toontown/otp/speedchat/SCCustomTerminal.py

19 lines
523 B
Python
Raw Normal View History

from .SCTerminal import SCTerminal
2019-11-02 17:27:54 -05:00
from otp.otpbase.OTPLocalizer import CustomSCStrings
SCCustomMsgEvent = 'SCCustomMsg'
def decodeSCCustomMsg(textId):
return CustomSCStrings.get(textId, None)
class SCCustomTerminal(SCTerminal):
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(SCCustomMsgEvent), [self.textId])