Exemple #1
0
    def __init__(self):
        pygame.init()
        self.screen = pygame.display.set_mode((640, 480))
        self.toggle_bg = True

        self.lines = TextLine(None, 60, "TextLine() Hi world!")

        self.text_wall = TextWall(None, 24)
        self.text_wall.parse_text("TextWall() Hello world!\nfoo\nbar!")
        self.text_wall.offset.topleft = (40, 50)

        self.text_wrap = TextWrap(None, 26, Rect(150, 50, 300, 300),
                                  "Hi world")
        self.text_wrap.parse_text(lorem)