-1
Guys, I’ve tried everything and I can’t copy a text from a Pygame window. The code is as follows:
import pygame
screen = pygame.display.set_mode((800, 600))
pygame.font.init()
font1 = pygame.font.Font(None, 150)
text = font1.render("Alô Mundo", True, (255, 255, 255))
screen.blit(text, (0, 200))
pygame.display.flip()
def principal():
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
return
pygame.time.delay(30)
principal()
I would like to copy the Alo Mundo that will appear on the pygame screen. Anyone have any suggestions ?
what did you mean by
copiar
?– Paulo Marques
be able to hover over the text and copy it, as is usually the case with any text
– relaie
I understand it is not possible, because the text is rendered as an image. If possible, it will surprise me. Someone?
– Paulo Marques
exact, you know if it is possible with Tkinter ?
– relaie
Yes, "printing" the text as
label
I believe it is possible.– Paulo Marques
but there is no way to copy the text of a label, it has ?
– relaie
Replying in the post
– Paulo Marques