historical/toontown-classic.git/otp/speedchat/SCStaticTextTerminal.py

19 lines
595 B
Python
Raw Normal View History

2024-01-16 17:20:27 +00:00
from SCTerminal import SCTerminal
from otp.otpbase.OTPLocalizer import SpeedChatStaticText
SCStaticTextMsgEvent = 'SCStaticTextMsg'
def decodeSCStaticTextMsg(textId):
return SpeedChatStaticText.get(textId, None)
class SCStaticTextTerminal(SCTerminal):
def __init__(self, textId):
SCTerminal.__init__(self)
self.textId = textId
self.text = SpeedChatStaticText[self.textId]
def handleSelect(self, displayType=0):
SCTerminal.handleSelect(self, displayType)
messenger.send(self.getEventName(SCStaticTextMsgEvent), [self.textId, displayType])