Label

class pygame_menu.widgets.Label(label, label_id='')[source]

Bases: pygame_menu.widgets.core.widget.Widget

Label widget.

Parameters:
  • label (str) – Text of the label
  • label_id (str) – Label ID
draw(surface)[source]

Draw the widget shape.

Parameters:surface (pygame.Surface) – Surface to draw
Returns:None
update(events)[source]

Update internal variable according to the given events list and fire the callbacks.

Parameters:events (list[pygame.event.Event]) – List of pygame events
Returns:True if updated
Return type:bool