Skip to content

Commit

Permalink
Merge pull request #486 from neilsimp1/fix-submenus-for-classes
Browse files Browse the repository at this point in the history
Fix for submenus to be subclasses of pygame.Menu
  • Loading branch information
ppizarror authored Oct 3, 2024
2 parents 9806f59 + 8e6bb55 commit 2ae9db6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pygame_menu/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ def __str__(self) -> str:
patch = property(lambda self: self[2])


vernum = Version(4, 4, 3)
vernum = Version(4, 4, 4)
ver = str(vernum)
rev = ''
2 changes: 1 addition & 1 deletion pygame_menu/widgets/widget/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def button(
action = _events.NONE

# If element is a Menu
if isinstance(action, type(self._menu)):
if isinstance(action, pygame_menu.Menu):
# Check for recursive
if action == self._menu or action.in_submenu(self._menu, recursive=True):
raise ValueError(
Expand Down

0 comments on commit 2ae9db6

Please # to comment.