label

class bgui.label.Label(parent, name=None, text='', font=None, pt_size=None, color=None, outline_color=None, outline_size=None, outline_smoothing=None, pos=[0, 0], sub_theme='', options=0)

Bases: bgui.widget.Widget

Widget for displaying text

Parameters:
  • parent – the widget’s parent
  • name – the name of the widget
  • text – the text to display (this can be changed later via the text property)
  • font – the font to use
  • pt_size – the point size of the text to draw (defaults to 30 if None)
  • color – the color to use when rendering the font
  • pos – a tuple containing the x and y position
  • sub_theme – name of a sub_theme defined in the theme file (similar to CSS classes)
  • options – various other options
theme_section = 'Label'
theme_options = {'OutlineSize': 0, 'Color': (1, 1, 1, 1), 'OutlineSmoothing': False, 'OutlineColor': (0, 0, 0, 1), 'Font': '', 'Size': 30}
text

The text to display

pt_size

The point size of the label’s font