Poodletooth-iLand/otp/speedchat/SCCustomMenu.py
Master Jumblespeed d882959bfa switch to remote
2015-05-18 22:11:33 -04:00

22 lines
615 B
Python
Executable file

from SCCustomTerminal import SCCustomTerminal
from SCMenu import SCMenu
from otp.otpbase.OTPLocalizer import CustomSCStrings
class SCCustomMenu(SCMenu):
def __init__(self):
SCMenu.__init__(self)
self.accept('customMessagesChanged', self.__customMessagesChanged)
self.__customMessagesChanged()
def __customMessagesChanged(self):
self.clearMenu()
try:
lt = base.localAvatar
except:
return
for msgIndex in lt.customMessages:
if msgIndex in CustomSCStrings:
self.append(SCCustomTerminal(msgIndex))