Pygame Message-multiple lines?

I use pygame and livreires (although I don't think this part matters here) to create the game. I have a game, but I'm trying to do something similar to the title screen before the game starts. However, it does not recognize when I try to create a new line. Here is what I have:

    begin_message=games.Message(value="""      Destroy the Bricks!\n
                                    In this game, you control a paddle,\n
                                    controlled by your mouse,\n
                                    and attempt to destroy all the rows of bricks.\n
                                    Careful though, you only have 1 life.\n
                                    Don't mess up! The game will start in\n
                                    5 seconds.""",
                            size=30,
                            x=games.screen.width/2,
                            y=games.screen.height/2,
                            lifetime=500,
                            color=color.white,
                            is_collideable=False)
games.screen.add(begin_message)

A message appears on the screen, but a new line is not executed, so I can only read the first part of the message. Is there a way to actually make this message, or can't I use the "Message" for this?

+3
source share
2 answers

Livewires games.Message games cannot do this.

. , games.Text, _create_surface(). , pygame.font.Font.render(), . render(),

" : ."

, , , Message, . .

+3

pygame . - python ( , .)

Glyph.

0

Source: https://habr.com/ru/post/1744095/


All Articles