def __init__( self, position = (0, 0), width = 0, font_size = 30 ): TextBox.__init__( self, width = width, position = position, text_color = (255, 255, 255), font_size = font_size ) self.text_entry_box = \ eztext.Input( maxlength = 10000, x = position[0], y = position[1], prompt = MessageEntryBox.MESSAGE_PROMPT, color = (255, 255, 255), font = pygame.font.Font('freesansbold.ttf', font_size) ) self.set_text()
def __init__(self, text, timeout = 3000): TextBox.__init__(self, text, 500, (0,0), (255,255,255), 20) self.timer = 0 self.timeout = timeout