ppizarror / pygame-menu

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

Dropselect not working in scrollable Frame #416

Closed CyberTeaX closed 1 year ago

CyberTeaX commented 2 years ago

Dropselect not working in scrollable Frame (does not show selectable items) In a non-scrollable frame everything works fine error

To Reproduce `import pygame_menu import pygame pygame.init() screen = pygame.display.set_mode((1000, 800)) menu = pygame_menu.Menu("frame", 400, 800)

frame = menu.add.frame_v(400, 2000, background_color=(50, 50, 50), padding=0, max_width=300, max_height=100) frame.set_title('My Frame App', title_font_color='white', padding_inner=(2, 5))

frame.pack(menu.add.dropselect( title='Is pygame-menu epic?', items=[('Yes', 0), ('Absolutely Yes', 1)], font_color='white', font_size=16, selection_option_font_size=20 )) for i in range(20): frame.pack(menu.add.button(i, font_color='white', button_id=f'b{i}')) menu.mainloop(screen)`

gustavklopp commented 2 years ago

In normal Frame everything works fine !

I'm sorry, to which example with Frame are you referring to? I can't see it.

CyberTeaX commented 2 years ago

Sorry, there is no example with dropselect working correctly. I mean if you make the Frame without scrollbar (remove max_width and max_height) dropselect will work fine. There will be a menu scrollbar, but it doesn't break the dropselect. Just replace this: frame = menu.add.frame_v(400, 2000, background_color=(50, 50, 50), padding=0, max_width=300, max_height=100) by this: frame = menu.add.frame_v(400, 2000, background_color=(50, 50, 50), padding=0)

ppizarror commented 1 year ago

I'm a little bit late, but I finally fixed this issue in #429