Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.8k views
in Technique[技术] by (71.8m points)

python - Maximize the pygame window without making it fullscreen

Is there a way to maximize the pygame window when intializing the window with set_mode without making it completely fulsscreen. I tried to get the required window_size by printing event.size, when VIDEORESIZE is called, which is (1920, 1017). But if I use this value for my window_size when setting mode I just get a window at the same size of a maximized window. If I press maximize in the top right corner it just switches between a thicker and a thinner border. Obviously i want the thinner border, is that possible from the start?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You should try to use the RESIZEABLE When using set_mode in pygame like

DISPLAYSURF = pygame.display.set_mode((1920,1017), RESIZABLE)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...