ppizarror / pygame-menu

A menu for pygame. Simple, and easy to use
https://pygame-menu.readthedocs.io/
Other
555 stars 141 forks source link

bug in windows #479

Closed andrew-karppinen closed 8 months ago

andrew-karppinen commented 8 months ago

Sieppaa Environment information Describe your environment information, such as:

Window opens so that it's pinned to the top-left corner and there's no title bar. There's no bug on Linux, but I often encounter it on Windows.

ppizarror commented 8 months ago

Hi, can you provide a minimal test case, or show the code around how you manage window, the menu creation, and so on? thanks

andrew-karppinen commented 8 months ago

The problem was actually just my own incorrect way of measuring the screen resolution, the "problem" is not related to the pygame menu library, but rather to pygame in general. Here is the sample code, and if you delete that line, there is no problem.

`import pygame import pygame_menu

pygame.init()

resolution = pygame.display.set_mode().get_size() #get screen resolution

surface = pygame.display.set_mode((600, 400), pygame.WINDOWMOVED)

menu = pygame_menu.Menu('Welcome', 400, 300, theme=pygame_menu.themes.THEME_BLUE)

menu.add.text_input('Test :', default='') menu.add.selector('Difficulty :', [('Hard', 1), ('Easy', 2)])

menu.mainloop(surface)`