Skip to content

Commit

Permalink
Merge pull request #467 from eforgacs/master
Browse files Browse the repository at this point in the history
Fix verbose flag in menubar
  • Loading branch information
ppizarror committed May 2, 2023
2 parents 529b9cb + 5aeb4cb commit f3d925b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pygame_menu/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ def __init__(
onreturn=self._back,
title=title,
width=self._width,
verbose=verbose
)
self._menubar.set_menu(self)
self._menubar.set_font(
Expand Down Expand Up @@ -1230,7 +1231,7 @@ def _update_after_remove_or_hidden(
# If added on execution time forces the update of the surface
self._widgets_surface = None

def _back(self) -> None:
def _back(self, **kwargs) -> None:
"""
Go to previous Menu or close if the top Menu is currently displayed.
"""
Expand Down
2 changes: 2 additions & 0 deletions pygame_menu/widgets/core/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -1955,6 +1955,8 @@ def set_menu(self, menu: Optional['pygame_menu.Menu']) -> 'Widget':
:param menu: Menu object
:return: Self reference
"""
if self._kwargs.get('verbose') is not None:
self._verbose = self._kwargs['verbose']
self._menu = menu
if menu is None:
self._col_row_index = (-1, -1, -1)
Expand Down

0 comments on commit f3d925b

Please sign in to comment.