@@ -280,7 +280,6 @@ class Widget(Base):
280280 :param kwargs: Optional keyword arguments
281281 """
282282
283- _accept_events : bool
284283 _alignment : str
285284 _angle : NumberType
286285 _args : list [Any ]
@@ -361,12 +360,9 @@ class Widget(Base):
361360 _update_callbacks : dict [
362361 str , Callable [[EventListType , Widget , pygame_menu .Menu ], Any ]
363362 ]
364- _visible : bool
365- active : bool
366363 configured : bool
367364 force_menu_draw_focus : bool
368365 is_scrollable : bool
369- is_selectable : bool
370366 last_surface : pygame .Surface | None
371367 lock_position : bool
372368 readonly : bool
@@ -383,6 +379,9 @@ def __init__(
383379 onselect : Callable [[bool , Widget , pygame_menu .Menu ], Any ] | None = None ,
384380 args = None ,
385381 kwargs = None ,
382+ * ,
383+ selectable : bool = True ,
384+ visible : bool = True ,
386385 ) -> None :
387386 super ().__init__ (object_id = widget_id )
388387
@@ -413,7 +412,7 @@ def __init__(
413412 self ._sound = Sound ()
414413 self ._tab_size = 0 # Tab spaces
415414 self ._title = str (title )
416- self ._visible = True # Use show() or hide() to modify this status
415+ self ._visible = visible # Use show() or hide() to modify this status
417416
418417 # If True, the widget don't contribute width/height to the Menu widget
419418 # positioning computation. Use .set_float() to modify this status
@@ -525,7 +524,7 @@ def __init__(
525524 self .configured = False # Widget has been configured
526525 self .force_menu_draw_focus = False # If True Menu draw focus if widget is selected, don't consider the previous requisites
527526 self .is_scrollable = False # Some widgets can be scrolled, such as the Frame
528- self .is_selectable = True # Some widgets cannot be selected like labels
527+ self .is_selectable = selectable # Some widgets cannot be selected like labels
529528 self .last_surface = None # Stores the last surface the widget has been drawn
530529 self .lock_position = False # If True, the widget don't update the position if .set_position() is executed
531530 self .readonly = False # If True, widget ignores all input
0 commit comments